shadowsocks-rust icon indicating copy to clipboard operation
shadowsocks-rust copied to clipboard

Need help with configuring sslocal via docker.

Open gurustron opened this issue 1 year ago • 5 comments

I want to use sslocal running in docker. I have started docker with config looking something like:

{
  "servers": [
    {
      "address":"server_ip",
      "port":server_port,
      "password":"server_pass",
      "method":"server_method",
      "timeout":60
    }
  ],
  "locals": [
    {
      "local_port": 1080,
      "local_address": "127.0.0.1"
    },
    {
      "protocol": "http",
      "local_address": "127.0.0.1",
      "local_port": 1081
    }
  ]
}

And mapped ports 1080 and 1081 to the host ones. When using http proxy inside the container it works (with 1081 port), but using proxy outside the container (with the host port) - request fails. Host OS - Windows.

gurustron avatar Sep 07 '24 20:09 gurustron

Have no idea what was actually happening in your environment. But the answer should be able to find in Docker's community.

zonyitoo avatar Sep 08 '24 07:09 zonyitoo

@zonyitoo it's just a local Win 11 machine with docker installed. My guess was that either I've missed something or that's not how the sslocal should be used. Do you have sample working setup?

gurustron avatar Sep 08 '24 13:09 gurustron

Just docker run should always be Ok. I have never used it in Docker on Windows, maybe there are something special on Windows' Docker.

zonyitoo avatar Sep 08 '24 15:09 zonyitoo

I am doing something completely unrelated, so maybe I am wrong, but I think you should set local_address to `"0.0.0.0" if you want to use it as a client inside a docker.

rezakr avatar Sep 25 '24 07:09 rezakr

docker run --network=host ……

dev4u avatar Sep 25 '24 12:09 dev4u