openconnect icon indicating copy to clipboard operation
openconnect copied to clipboard

Feature: Expose SOCK5 Proxy

Open sfc9982 opened this issue 2 years ago • 1 comments

Could you let the docker expose a SOCKS5 proxy? I've tried to modify your code, but failed. Thanks.

sfc9982 avatar Oct 29 '22 11:10 sfc9982

Hi there,

I'd recommend using something like docker-compose to put a proxy from another container in front of this one.

For example, you can do something like this:

---

openconnect:
  image: aw1cks/openconnect:latest
 <configure openconnect container here>

...

socks:
  # Using Squid as an example here,
  # any SOCKS-compatible proxy works fine
  # N.B. you probably need to configure Squid to do SOCKS - by default it will only do HTTP proxy
  image: ubuntu/squid:latest
  ports:
    - "3128:3128"
  restart: always
  # This will route the proxy's traffic through the `openconnect` service defined above
  network_mode: service:openconnect

aw1cks avatar Oct 31 '22 09:10 aw1cks