Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议提高trojan-web的密码强弱问题 #639

Closed
Potterli20 opened this issue Mar 10, 2022 · 6 comments
Closed

建议提高trojan-web的密码强弱问题 #639

Potterli20 opened this issue Mar 10, 2022 · 6 comments

Comments

@Potterli20
Copy link

p4gefau1t/trojan-go#59 (comment)

@Jrohy
Copy link
Owner

Jrohy commented Mar 10, 2022

开源代码,信不过release编译的也可以自己编译,具体参考下build.sh脚本(得先编译好trojan-web前端)

@Potterli20
Copy link
Author

开源代码,信不过release编译的也可以自己编译,具体参考下build.sh脚本(得先编译好trojan-web前端)

我就编译trojan-go的内核

@Potterli20 Potterli20 changed the title 有人说你的脚本是会偷密码 建议提高trojan-web的密码强弱问题 Mar 10, 2022
@Potterli20 Potterli20 reopened this Mar 10, 2022
@Jrohy
Copy link
Owner

Jrohy commented Mar 14, 2022

本来想通过ip限制登录接口登录失败多就锁ip来防止穷举出用户密码的(代码都写好了),后面发现经过https trojan转发后根本获取不到用户ip(经过转发后都是127.0.0.1)😥.

@Potterli20
Copy link
Author

本来想通过ip限制登录接口登录失败多就锁ip来防止穷举出用户密码的(代码都写好了),后面发现经过https trojan转发后根本获取不到用户ip(经过转发后都是127.0.0.1)😥.

可我用nginx的话是可以的,我是反代理了

@Jrohy
Copy link
Owner

Jrohy commented Mar 14, 2022

nginx 是可以加些参数就行,但如果没用nginx用trojan或者trojan-go来转发代理https就获取不到实际ip了,除非访问trojan-web用http

@Potterli20
Copy link
Author

Potterli20 commented Mar 20, 2022

nginx 是可以加些参数就行,但如果没用nginx用trojan或者trojan-go来转发代理https就获取不到实际ip了,除非访问trojan-web用http

为什么我反代理会出现401??
location ~* ^/(static|common|auth|trojan)/ {
proxy_buffering off;
proxy_redirect off;
proxy_pass http://127.0.0.1:81;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /sub
{
proxy_buffering off;
proxy_redirect off;
proxy_pass http://127.0.0.1:81;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
add_header X-Cache $upstream_cache_status;

#Set Nginx Cache

	add_header Cache-Control no-cache;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants