Mon-ius / Docker-Warp-Socks

Connet to CloudFlare WARP, exposing `socks5` proxy all together.
https://hub.docker.com/r/monius/docker-warp-socks
GNU General Public License v3.0
370 stars 39 forks source link

Container cannot start after first start #6

Closed GibMeMyPacket closed 1 year ago

GibMeMyPacket commented 1 year ago

Create the container and then exit/stop it, then start it again with docker container start warp_socks -a You will get the following error and container fails.


2023/03/31 20:45:44 existing account detected
github.com/ViRb3/wgcf/cmd/register.registerAccount
        /home/runner/work/wgcf/wgcf/cmd/register/register.go:42
github.com/ViRb3/wgcf/cmd/register.glob..func1
        /home/runner/work/wgcf/wgcf/cmd/register/register.go:28
github.com/spf13/cobra.(*Command).execute
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:860
github.com/spf13/cobra.(*Command).ExecuteC
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974
github.com/spf13/cobra.(*Command).Execute
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902
github.com/ViRb3/wgcf/cmd.Execute
        /home/runner/work/wgcf/wgcf/cmd/root.go:37
main.main
        /home/runner/work/wgcf/wgcf/main.go:11
runtime.main
        /opt/hostedtoolcache/go/1.18.3/x64/src/runtime/proc.go:250
runtime.goexit
        /opt/hostedtoolcache/go/1.18.3/x64/src/runtime/asm_amd64.s:1571
sed: can't read /opt/wgcf-profile.conf: No such file or directory```
Mon-ius commented 1 year ago

Hi Gib

Do you try the recommand running parameters?

docker run --privileged --restart=always -itd \
    --name warp_socks \
    --sysctl net.ipv6.conf.all.disable_ipv6=0 \
    --sysctl net.ipv4.conf.all.src_valid_mark=1 \
    --cap-add NET_ADMIN --cap-add SYS_MODULE \
    -p 9091:9091 \
    -v /lib/modules:/lib/modules \
    monius/docker-warp-socks

it will create a new account to avoid your issues. plz let me know if there are further error.

Mon-ius commented 1 year ago

Also, remember to stop and remove the original container before that

docker stop warp_socks && docker rm warp_socks

Mon-ius commented 1 year ago

Fix; https://github.com/Mon-ius/Docker-Warp-Socks/commit/92c1aadd837122fd046ba5992cb729606bc12261