mirror of
https://github.com/ProxymanApp/proxyman-windows-linux.git
synced 2026-04-27 00:45:55 +03:00
[GH-ISSUE #390] Support External Proxy #388
Labels
No labels
Linux
bug
enhancement
enhancement
pull-request
question
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxyman-windows-linux#388
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NghiaTranUIT on GitHub (Mar 20, 2024).
Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/390
Originally assigned to: @kics223w1 on GitHub.
Description
Some users report that they are using their corporated Proxy Server to access the Internet. They need the External Proxy Tools from macOS to work on Windows.
See how it works on macOS:
Requirement for the External Proxy
UI
How External Proxy Works
In this normal case:
5.1. cURL sent a HTTP Request to Proxyman
5.2. Proxyman detects that External Proxy Service is ON
5.3. Proxyman sent CONNECT Request
5.4. Charles receives a new CONNECT and then response:
5.5 Proxyman reads this Response from Charles Proxy and starts a tunnel to Charles Proxy
5.6 When the Tunnel is ready, here is how it looks
cURL -> Proxyman ---(External Proxy)---> Charles PRoxy -> The Internet
⚠️ it should work with HTTP, HTTPS (intercept), and proxy HTTPS Mode.
Logic: External Proxy Setting
ExternalProxyService,ExternalProxySetting,BypassProxyEntryandExternalProxySettingServiceand try to port to Windows/Linux@NghiaTranUIT commented on GitHub (Mar 20, 2024):
Will add more details requirement for the External Proxy, Bypass Proxy, Include List and the Unit Test soon 👍
@NghiaTranUIT commented on GitHub (Mar 21, 2024):
External Proxy Service Requirement
ExternalProxyService,ExternalProxySettinghttps://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/5f0cddb3-dba9-41e8-a0d4-a2d920be7df9
EncryptionService.swifthostandportfrom the ProxyServer, we should callproxySetting(isHTTPS: Bool, host: String, port: Int) -> ExternalProxySettingto return to the correct Proxy for this Host/Port => Verify we carefully port it to TypeScriptHow to test External Proxy manually
curl 'https://httpbin.proxyman.app/get?id=123' --proxy http://localhost:9090-> Verify:httpbin.proxyman.appshows in both Proxyman + Charles Proxycurl 'https://www.google.com/' --proxy http://localhost:9090-> Verify:www.google.comshows in both Proxyman + Charles Proxycurl "http://httpbin.org/get?id=123" --proxy localhost:9090-> Verify:httpbin.orgshows in both Proxyman + Charles Proxycurl "http://www.producthunt.com" --proxy localhost:9090-> Verify:www.producthunt.comshows in both Proxyman + Charles Proxy⚠️ Important Logic
@NghiaTranUIT commented on GitHub (Mar 21, 2024):
Bypass Proxy Requirement
ExternalProxySettingService.swiftparesHostList(hostList:)works correctly to parse the Host from a given List.*.api.comFor example:
127.0.0.1, localhost,data.com,proxyman,io, api.proxyman.comwill parse to-> Seperated by the
,and trim the whitespace + newline of each entry (Leading & Trailing position)How to test Bypass Proxy manually
httpbin.proxyman.app:443, www.google.comcurl "https://httpbin.proxyman.app/get?id=123" --proxy localhost:9090-> Verify:httpbin.proxyman.apponly shows in Proxyman, not Charles Proxy (because it matched the Bypass Proxy)curl "https://www.google.com" --proxy localhost:9090-> Verify:www.google.comonly shows in Proxyman, not Charles Proxy (because it matched the Bypass Proxy)curl "http://httpbin.org/get?id=123" --proxy localhost:9090-> Verify:httpbin.orgonly shows in Proxyman + Charles Proxy -> It matches the external Proxy, but doesn't match the bypass proxycurl "http://www.producthunt.com" --proxy localhost:9090-> Verify:www.producthunt.comonly shows in Proxyman + Charles Proxy -> It matches the external Proxy, but doesn't match the bypass proxycurl "http://localhost:3000" --proxy localhost:9090-> Verify:localhost:3000only shows in Proxyman + Charles Proxy -> It matches the external Proxy, but doesn't match the bypass proxyHow to test "Bypass Localhost" manually
httpbin.proxyman.app:443, www.google.comcurl "http://www.producthunt.com" --proxy localhost:9090-> Verify:www.producthunt.comonly shows in Proxyman + Charles Proxy -> It matches the external Proxy, but doesn't match the bypass proxycurl "http://localhost:3000" --proxy localhost:9090-> Verify:localhost:3000only shows in Proxyman, not Charles Proxy -> It matches the external Proxy, and matched theAlways bypass localhost.@NghiaTranUIT commented on GitHub (Mar 21, 2024):
Include List Proxy Requirement
ExternalProxySettingService, so it should inherit all logic from the Bypass ProxyHow to test Include List manually
*.appcurl "https://httpbin.proxyman.app/get?id=123" --proxy localhost:9090-> Verify:httpbin.proxyman.appshows in Proxyman and Charles Proxy (because it matched the Include List)curl "https://www.google.com" --proxy localhost:9090-> Verify:www.google.comonly shows in Proxyman, not Charles Proxy (because it doesn't match the Include List)curl "http://httpbin.org/get?id=123" --proxy localhost:9090-> Verify:httpbin.orgonly shows in Proxyman, not Charles Proxy (because it doesn't match the Include List)curl "http://www.producthunt.com" --proxy localhost:9090-> Verify:www.producthunt.comonly shows in Proxyman, not Charles Proxy (because it doesn't match the Include List)curl "http://localhost:3000" --proxy localhost:9090-> Verify:localhost:3000only shows in Proxyman, not Charles Proxy -> It matches the external Proxy, but doesn't match the Include List@NghiaTranUIT commented on GitHub (Mar 21, 2024):
Unit Tests
ExternalProxyServiceTests.swift,ByPassProxyServiceTests.swift, andIncludeListProxyServiceTests.swift. Ping @NghiaTranUIT to get these files.Example:
@NghiaTranUIT commented on GitHub (Mar 22, 2024):
How to test with External Proxy v2