In a socat address, write proxyport=8080. The spelling proxyport:8080 is parsed as an unknown option.

socat TCP4-LISTEN:9090,bind=127.0.0.1,fork PROXY:proxy.example:service.example:80,proxyport=8080

This illustrative command accepts local TCP connections on 127.0.0.1:9090. It connects to proxy.example on port 8080 and asks that HTTP proxy for a CONNECT tunnel to service.example:80. The proxy must permit that destination and port. For a permitted public-service test, the HTTP proxy list offers endpoint candidates, whose CONNECT access to the actual target and port must be checked.

The three ports have separate jobs: 9090 is the local listener, 8080 is the proxy listener, and 80 is the final service port. Colons separate the PROXY address’s positional fields; comma-separated address options use name=value when they take a value.

Related articles