[GH-ISSUE #198] --auth-url用起来不太方便,建议这样改改 #125

Closed
opened 2026-02-27 23:15:33 +03:00 by kerem · 0 comments
Owner

Originally created by @XYDsoft on GitHub (Dec 21, 2018).
Original GitHub issue: https://github.com/snail007/goproxy/issues/198

用--auth-url来判断用户ip是否在白名单或者黑名单内,但是发现一个问题
使用了--auth-url,也只有--auth-url可以控制用户ip是否可以使用该代理。但是,为何非要user&pass呢?
若代理ip客户端不使用验证,--auth-url居然是无效的,这是一个奇怪的问题

./proxy http -t tcp -p ":33080" --auth-url "http://test.com/auth.php"
用户连接的时候,proxy会GET方式请求这url("http://test.com/auth.php"),
带上user,pass,ip,target四个参数:
http://test.com/auth.php?user={USER}&pass={PASS}&ip={IP}&target={TARGET}
user:用户名
pass:密码
ip:用户的IP,比如:192.168.1.200
target:用户访问的URL,比如:http://demo.com:80/1.html或https://www.baidu.com:80

Originally created by @XYDsoft on GitHub (Dec 21, 2018). Original GitHub issue: https://github.com/snail007/goproxy/issues/198 用--auth-url来判断用户ip是否在白名单或者黑名单内,但是发现一个问题 使用了--auth-url,也只有--auth-url可以控制用户ip是否可以使用该代理。但是,为何非要user&pass呢? 若代理ip客户端不使用验证,--auth-url居然是无效的,这是一个奇怪的问题 > ./proxy http -t tcp -p ":33080" --auth-url "http://test.com/auth.php" 用户连接的时候,proxy会GET方式请求这url("http://test.com/auth.php"), 带上user,pass,ip,target四个参数: http://test.com/auth.php?user={USER}&pass={PASS}&ip={IP}&target={TARGET} user:用户名 pass:密码 ip:用户的IP,比如:192.168.1.200 target:用户访问的URL,比如:http://demo.com:80/1.html或https://www.baidu.com:80 >
kerem 2026-02-27 23:15:33 +03:00
  • closed this issue
  • added the
    invalid
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#125
No description provided.