ex3ndr / telegram-proxy

Simplest Docker image for starting proxy for Telegram
http://telegram-s.org
89 stars 14 forks source link

Custom credentials do not work #8

Open WhiteBearSpirit opened 6 years ago

WhiteBearSpirit commented 6 years ago

I run docker image with -e SOCKS_USER=telegram -e SOCKS_PASSWORD=telegram I can inspect docker and see:

            "Env": [
                "SOCKS_USER=telegram",
                "SOCKS_PASSWORD=telegram",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],

But I can't connect using those credentials. docker logs telegram-proxy shows following:

[ERR] socks: Failed to authenticate: User authentication failed

If I try to connect using default credentials (user=user&pass=password) it works just fine. And I can't change this.

I am using docker.io/ex3ndr/telegram-proxy latest

lodgnewt commented 6 years ago

Same problem. Any ideas how to fix it?

iworker commented 6 years ago

@lodgnewt @WhiteBearSpirit it seems that docker image is not updated: https://hub.docker.com/r/ex3ndr/telegram-proxy/ So you can just build it by yourself and use your own build:

docker build -t telegram-proxy .
docker run --restart always -d --name telegram-proxy -p 1080:1080 --env-file .env telegram-proxy:latest

where .env file in my case:

SOCKS_WHITELIST=149.154.164.0/22,91.108.4.0/22,91.108.56.0/22,91.108.8.0/22,91.108.12.0/22,91.108.16.0/22,149.154.168.0/22,149.154.160.0/22,88.99.136.236,149.154.175.50,2001:67c:4e8::/48
SOCKS_AUTH=no

You can use something different.

Also you can use my image, which contains latest actual code:

docker run --restart always -d --name telegram-proxy -p 1080:1080 --env-file .env pomortsev/telegram-proxy:latest
bloogrox commented 5 years ago

Authors can delete this lines https://github.com/ex3ndr/telegram-proxy/blob/master/Dockerfile#L11-L12 from Dockerfile, as default user and password already exist in the code https://github.com/ex3ndr/telegram-proxy/blob/master/main.go#L38-L39