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

【功能建议】认证信息可以参数形式传递 #467

Closed
soffchen opened this issue Jan 11, 2020 · 8 comments
Closed

【功能建议】认证信息可以参数形式传递 #467

soffchen opened this issue Jan 11, 2020 · 8 comments

Comments

@soffchen
Copy link
Contributor

目前认证信息是 user:pass@host:port,对于一些特殊字符的不能直接使用,比如用户名是邮箱,包含 @ 的话就不行。虽然有提供 secret.txt 来实现,但是就不能通过一条命令就完整实现一个完成转发功能。

是否可以考虑增加这样方式 schema://host:port?user=xxxxx&pass=xxxx,比如 socks5://1.2.3.4:1080?user=a@b.com&password=xxxxxx,甚至可以先对参数做一次urldecode

@ginuerzh
Copy link
Owner

可以考虑加参数

@endokai
Copy link

endokai commented Jan 16, 2020

只是换到参数里面这样密码如果有&就又不能用了,这实际需要的应该是一个转义功能,比如使用\来对后续的一个字符进行转义。

@soffchen
Copy link
Contributor Author

原来的形式还兼容,有 & 放前面好了,上面也提到参数可以提供 urlencode 的方案。%4012125%2612

@endokai
Copy link

endokai commented Jan 16, 2020

有&放前面,有@放后面?明显多余了,而且要是两个同时有怎么办。而转义的话既通用又操作简单,也是易读易编写的,编码还需要第三方工具,还不如写文件。而且你密码本身是字面的%40怎么办?是不是还要继续想怎么解决这个问题,比如用另外的参数区别是urlencode还是字面的密码

@endokai
Copy link

endokai commented Jan 16, 2020

除非是使用参数的形式强制使用url编码,就如一般的浏览器网址一样。不过就如我说的显得有些多余和麻烦。虽然gost的参数是类URL的,但运行还是在命令行里面运行的,感觉不必太刻意模仿

@ginuerzh
Copy link
Owner

可以采用http的basic auth方式,进行base64编码,这样就不用考虑这么多问题了。

@changchichung
Copy link

請問能加入 sha512 hash 的密碼支援嗎?

@ginuerzh
Copy link
Owner

@changchichung 具体用处?

ginuerzh added a commit that referenced this issue Jan 22, 2020
hktalent pushed a commit to hktalent/gost that referenced this issue Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants