mirror of
https://github.com/snail007/goproxy.git
synced 2026-04-27 08:25:54 +03:00
[GH-ISSUE #500] 关于 API认证时UDP通信时的问题 #402
Labels
No labels
TODO
bug
duplicate
enhancement
good first issue
help wanted
helpful
invalid
need-confirm
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/goproxy#402
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @agenge on GitHub (Sep 13, 2022).
Original GitHub issue: https://github.com/snail007/goproxy/issues/500
Expected Behavior
使用API认证(--auth-url)时,UDP能通过认证,且成功代理。
Current Behavior
UDP程序通信时,使用API认证(--auth-url)无法通过认证
Possible Solution
Steps to Reproduce
proxy sps -t tcp -p ":1880" --udp-port 1880 --udp --disable-ss --disable-http --auth-url http://127.0.0.1/auth.php2.Python写了个 UDP Server/Client(参考示例:点这里),使用命令行认证模式,UDP测试正常。 但使用
--auth-url 认证模式,提示认证失败,报以下错误:
utils/structs.go:501 WARN auth fail from url http://127.0.0.1/auth.php?user=&pass=&client_addr=1.1.1.1:28761&local_addr=[::]:1880&target=&service=socks&sps=1,resonse code: 200, except: 204 , 1.1.1.1:28761 -> [::]:1880
可以看出 user pass都为空导致。
3. 通过tcpdump抓包,发现有2次 http请求(实际上测试工具只请了一次),但是抓包的结果来看,第一次请求有带认证信息,第二次请求无认证信息(user pass为空)
tcpdump -A -i lo tcp port 1880Context (Environment)
proxy sps -t tcp -p ":1880" --udp-port 1880 --udp --disable-ss --disable-http --auth-url http://127.0.0.1/auth.phpDetailed Description
Possible Implementation