[GH-ISSUE #2080] 使用http_proxy无法连接到frp服务端 #1656

Closed
opened 2026-05-05 13:03:28 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @nicholasdrag on GitHub (Nov 18, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/2080

[REQUIRED] hat version of frp are you using

Version:0.34.2

[REQUIRED] What operating system and processor architecture are you using
OS:Win10

[REQUIRED] description of errors

confile

[common]
server_addr = frps服务器的公网ip
server_port = 37000
http_proxy = http://[用户名]:[密码]@[公司浏览器代理ip]:[端口]

[RDP]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 3389

log file

2020/11/18 14:41:43 [W] [service.go:102] login to server failed: DialTcpByHttpProxy error, StatusCode [403]
DialTcpByHttpProxy error, StatusCode [403]

Steps to reproduce the issue
1.使用环境:win10主机作为frpc客户端,在公司内网环境中必须要通过浏览器代理才能访问外网,不设置代理就无法访问vps上的frps服务端。
2. win10主机cmd执行frpc.exe -c frpc.ini
3. 执行后报错:[service.go:102] login to server failed: DialTcpByHttpProxy error, StatusCode [403]
DialTcpByHttpProxy error, StatusCode [403]。如果我把配置文件中http_proxy中的密码替换成错误的,报错信息是DialTcpByNTLMHttpProxy error, StatusCode [407]
4.PS:不使用公司的网络,并删除配置文件中的http_proxy,是可以成功连上frps服务器的。

请问大佬,这种情况是不是被公司网络限制了?

Originally created by @nicholasdrag on GitHub (Nov 18, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/2080 <!-- From Chinese to English by machine translation, welcome to revise and polish. --> <!-- ⚠️⚠️ Incomplete reports will be marked as invalid, and closed, with few exceptions ⚠️⚠️ --> <!-- in addition, please use search well so that the same solution can be found in the feedback, we will close it directly --> <!-- for convenience of differentiation, use FRPS or FRPC to refer to the FRP server or client --> **[REQUIRED] hat version of frp are you using** <!-- Use ./frpc -v or ./frps -v --> Version:0.34.2 **[REQUIRED] What operating system and processor architecture are you using** OS:Win10 **[REQUIRED] description of errors** **confile** <!-- Please pay attention to hiding the token, server_addr and other privacy information --> [common] server_addr = frps服务器的公网ip server_port = 37000 http_proxy = http://[用户名]:[密码]@[公司浏览器代理ip]:[端口] [RDP] type = tcp local_ip = 127.0.0.1 local_port = 3389 remote_port = 3389 **log file** <!-- If the file is too large, use Pastebin, for example https://pastebin.ubuntu.com/ --> 2020/11/18 14:41:43 [W] [service.go:102] login to server failed: DialTcpByHttpProxy error, StatusCode [403] DialTcpByHttpProxy error, StatusCode [403] **Steps to reproduce the issue** 1.使用环境:win10主机作为frpc客户端,在公司内网环境中必须要通过浏览器代理才能访问外网,不设置代理就无法访问vps上的frps服务端。 2. win10主机cmd执行frpc.exe -c frpc.ini 3. 执行后报错:[service.go:102] login to server failed: DialTcpByHttpProxy error, StatusCode [403] DialTcpByHttpProxy error, StatusCode [403]。如果我把配置文件中http_proxy中的密码替换成错误的,报错信息是DialTcpByNTLMHttpProxy error, StatusCode [407] 4.PS:不使用公司的网络,并删除配置文件中的http_proxy,是可以成功连上frps服务器的。 请问大佬,这种情况是不是被公司网络限制了?
gitea-mirror 2026-05-05 13:03:28 -06:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@fatedier commented on GitHub (Nov 19, 2020):

https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/403
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/407

To search for code 403, it means your username or password not correct.

<!-- gh-comment-id:730118238 --> @fatedier commented on GitHub (Nov 19, 2020): https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/403 https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/407 To search for code 403, it means your username or password not correct.
Author
Owner

@nicholasdrag commented on GitHub (Nov 19, 2020):

https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/403
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/407

To search for code 403, it means your username or password not correct.

可能是我的密码里有个特殊字符@ ,请问要怎么处理呢?我将它转化成%40试了一下也还是报403

<!-- gh-comment-id:730135000 --> @nicholasdrag commented on GitHub (Nov 19, 2020): > https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/403 > https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/407 > > To search for code 403, it means your username or password not correct. 可能是我的密码里有个特殊字符@ ,请问要怎么处理呢?我将它转化成%40试了一下也还是报403
Author
Owner

@fatedier commented on GitHub (Nov 19, 2020):

Please make sure all special characters are escaped?

<!-- gh-comment-id:730152336 --> @fatedier commented on GitHub (Nov 19, 2020): Please make sure all special characters are escaped?
Author
Owner

@nicholasdrag commented on GitHub (Nov 19, 2020):

Please make sure all special characters are escaped?

密码中只有一个@是特殊字符哈,比如Ab@12,请问我该如何正确转义,Ab%4012这样对吗?

<!-- gh-comment-id:730168388 --> @nicholasdrag commented on GitHub (Nov 19, 2020): > Please make sure all special characters are escaped? 密码中只有一个@是特殊字符哈,比如Ab@12,请问我该如何正确转义,Ab%4012这样对吗?
Author
Owner

@fatedier commented on GitHub (Nov 19, 2020):

@nicholasdrag I'm not sure what's wrong with your case.

@yuyulei Can you validate if it's a problem when the password has @.

<!-- gh-comment-id:730175410 --> @fatedier commented on GitHub (Nov 19, 2020): @nicholasdrag I'm not sure what's wrong with your case. @yuyulei Can you validate if it's a problem when the password has `@`.
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: github-starred/frp#1656
No description provided.