[GH-ISSUE #500] 关于 API认证时UDP通信时的问题 #402

Open
opened 2026-02-27 23:16:47 +03:00 by kerem · 0 comments
Owner

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

  1. 启动命令:
    proxy sps -t tcp -p ":1880" --udp-port 1880 --udp --disable-ss --disable-http --auth-url http://127.0.0.1/auth.php

2.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 1880

Context (Environment)

  1. proxy version is : commercial_12.1
  2. full command is :
    proxy sps -t tcp -p ":1880" --udp-port 1880 --udp --disable-ss --disable-http --auth-url http://127.0.0.1/auth.php
  3. system is : Ubuntu 20.04.4 LTS 、Kernel: Linux ubuntu 5.4.0-125
  4. full log is: ?

Detailed Description

Possible Implementation

Originally created by @agenge on GitHub (Sep 13, 2022). Original GitHub issue: https://github.com/snail007/goproxy/issues/500 <!--- Provide a general summary of the issue in the Title above --> ## Expected Behavior 使用API认证(--auth-url)时,UDP能通过认证,且成功代理。 ## Current Behavior UDP程序通信时,使用API认证(--auth-url)无法通过认证 ## Possible Solution ## Steps to Reproduce 1. 启动命令: `proxy sps -t tcp -p ":1880" --udp-port 1880 --udp --disable-ss --disable-http --auth-url http://127.0.0.1/auth.php` 2.Python写了个 UDP Server/Client(参考示例:[点这里](https://blog.csdn.net/weixin_44100850/article/details/89512481)),使用命令行认证模式,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](http://1.1.1.1:28761/) -> [::]:1880 可以看出 user pass都为空导致。 3. 通过tcpdump抓包,发现有2次 http请求(实际上测试工具只请了一次),但是抓包的结果来看,第一次请求有带认证信息,第二次请求无认证信息(user pass为空) `tcpdump -A -i lo tcp port 1880` ## Context (Environment) 1. proxy version is : commercial_12.1 2. full command is : `proxy sps -t tcp -p ":1880" --udp-port 1880 --udp --disable-ss --disable-http --auth-url http://127.0.0.1/auth.php` 1. system is : Ubuntu 20.04.4 LTS 、Kernel: Linux ubuntu 5.4.0-125 1. full log is: ? <!--- Provide a general summary of the issue in the Title above --> ## Detailed Description <!--- Provide a detailed description of the change or addition you are proposing --> ## Possible Implementation <!--- Not obligatory, but suggest an idea for implementing addition or change -->
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#402
No description provided.