Alter id Issue
kamyargerami opened this issue · 9 comments
Hi
Today I had a problem connecting to my upstream server which is blocked in Iran.
I increase my "alterid" to a number greater than 30 and It solves my issue.
I searched for it and as the document said, It's better to change to a number between 30 and 100.
I can contribute to this if you don't mind
Do you use the recent docker image?
The alterid is depracted in the latest versions and it should be 0 otherwise it raises warning.
I don't pull the project for a month, but I'm using v2fly-core:v4.45.2
I don't know, but It helped me to resolve IP blocking.
Also I'm not seeing anything about alterid in change logs.
https://www.v2ray.com/en/welcome/versions.html
https://github.com/v2fly/v2ray-core/releases
check your docker logs please
Now I checked both upstream and bridge servers with these commands and also nothing was there about it
/ # cat /var/log/v2ray/error.log | grep "alter"
/ # cat /var/log/v2ray/access.log | grep "alter"
Error Log:
2022-01-17T09:03:42.168 app[629f0226] sin [info] 2022/01/17 09:03:42 1.***.***.***:0 rejected common/drain: common/drain: unable to drain connection > websocket: close 1000 (normal) > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future.
As you can see I've already added the env v2ray.vmess.aead.forced = false
in docker-compose.yml file but the log says this env won't work in future.
I pulled the repository again and I test the alterid = 0 in both my servers.
The first one was the server available in Iran and it worked just fine.
The second one was the blocked server and It's not working.
I think alterid has something that government can't detect the structure of the packets. or ...
So I returned back the alterid in bridge and upstream and in my vmess client I changed it to 0 and it works well without any error in the server.
According to the document:
"After v4.28.1, the AlterID of the client is set to 0 to enable VMessAEAD; the server is automatically adapted, which can be compatible with clients with and without VMessAEAD enabled at the same time."
I think we can return the alterid for feature problems and IP banning in Iran.
Actually, I think this warning comes from the client when we use alterid in them.
Added to tips.
#57
Thanks for your report.