- Clone the repository
- Install the NPM dependencies:
npm install
- Run the Socks5 server:
npm run socks-proxy
- Run the http proxy server:
npm run http-proxy
- Execute the swift code:
swift main.swift
Expected: localhost response contains the Hello from the Socks proxy
or Hello fro the HTTP proxy
response.
Actual: localhost response does not use the proxy and tries to call the localhost server directly. This causes in this example connection refused
, because there is no server running.
This is reproducible for socks and http proxies.