Open miladjafary opened 4 years ago
You can edit config.py and set tg2, tg3 and so on with random secret. And that secret is also the password so when you share the tg link then you give that user's password to others. You can use command "ps -ef | grep python3" to find the pid then use command "kill -9 pid" to kill it. Afterwards you can use "python3 mtprotoproxy.py" to start it.
My problem is how can I generate the password since it's a hash.
`# name -> secret (32 hex chars) USERS = { "tg": "00000000000000000000000000000001",
}`
As you can see, I have to create 32 hex chars for the password while I don't know how can I creat it.
Meanwhile I wanna to create a just simple user as the follow:
# name -> secret (32 hex chars) USERS = { "milad": "password" }
`
https://onlinerandomtools.com/generate-random-hexadecimal-numbers
I used google and found this website to help you generate the hex chars. If you want to know how to setup password then you should contact the developer @alexbers
openssl rand -hex 16
head -c 16 /dev/urandom | xxd -ps
shorter version
xxd -l 16 -p /dev/urandom
Any method to add new users w/o restart so the logs are not wiped?!
Any method to add new users w/o restart so the logs are not wiped?!
After adding user, run this:
ps -ef | grep */mtprotoproxy.py | awk '{print $2}' | xargs sudo kill -SIGUSR2
I guess might work but with minor modification: ps -ef | grep mtprotoproxy.py | awk '{print $2}' | xargs sudo kill -SIGUSR2
How can I add a user and restart the service? How can I create the password? If the proxy has been started by Docker, how can I restart the service? if the proxy has been started without Docker how can I restart the service?