[GH-ISSUE #531] 关于使用 http_proxy 插件的疑问 #409

Closed
opened 2026-05-05 12:13:44 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @tolbkni on GitHub (Nov 20, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/531

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
0.13.0

What operating system and processor architecture are you using (go env)?
macOS 10.13.1

Configures you used:

[common]
server_addr = SERVER_ADDR
server_port = 7000
http_proxy = http://PROXY_IP:8080

[plugin_http_proxy]
type = tcp
remote_port = 6000
plugin = http_proxy
plugin_http_user = abc
plugin_http_passwd = abc

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):
官方文档有这一段话:

通过 frpc 所在机器访问外网
frpc 内置了 http proxy 和 socks5 插件,可以使其他机器通过 frpc 的网络访问互联网。
frps 的部署步骤同上。
启动 frpc,启用 http_proxy 或 socks5 插件(plugin 换为 socks5 即可), 配置如下:

# frpc.ini
[common]
server_addr = x.x.x.x
server_port = 7000

[http_proxy]
type = tcp
remote_port = 6000
plugin = http_proxy

浏览器设置 http 或 socks5 代理地址为 x.x.x.x:6000,通过 frpc 机器的网络访问互联网。

我最初的理解是内网的其他机器通过 frpc 访问互联网,所以应该是 frpc 上侦听 6000 端口,但实际上是 frps 上侦听了 6000 端口。按照 frp 的用法,一般 frpc 在内网,frps 在外网,不太能理解能访问 frps 的机器什么情况下还需要通过 frpc 机器的网络来访问互联网,这里挺困惑的。
希望能解答一下,谢谢!

说明:我预期是希望内网的其他机器能通过 frpc 机器作为代理访问互联网。

Can you point out what caused this issue (optional)

Originally created by @tolbkni on GitHub (Nov 20, 2017). Original GitHub issue: https://github.com/fatedier/frp/issues/531 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** 0.13.0 **What operating system and processor architecture are you using (`go env`)?** macOS 10.13.1 **Configures you used:** ``` [common] server_addr = SERVER_ADDR server_port = 7000 http_proxy = http://PROXY_IP:8080 [plugin_http_proxy] type = tcp remote_port = 6000 plugin = http_proxy plugin_http_user = abc plugin_http_passwd = abc ``` **Steps to reproduce the issue:** 1. 2. 3. **Describe the results you received:** **Describe the results you expected:** **Additional information you deem important (e.g. issue happens only occasionally):** 官方文档有这一段话: > 通过 frpc 所在机器访问外网 > frpc 内置了 http proxy 和 socks5 插件,可以使其他机器通过 frpc 的网络访问互联网。 > frps 的部署步骤同上。 > 启动 frpc,启用 http_proxy 或 socks5 插件(plugin 换为 socks5 即可), 配置如下: > ``` > # frpc.ini > [common] > server_addr = x.x.x.x > server_port = 7000 > > [http_proxy] > type = tcp > remote_port = 6000 > plugin = http_proxy > ``` > 浏览器设置 http 或 socks5 代理地址为 x.x.x.x:6000,通过 frpc 机器的网络访问互联网。 我最初的理解是内网的其他机器通过 frpc 访问互联网,所以应该是 frpc 上侦听 6000 端口,但实际上是 frps 上侦听了 6000 端口。按照 frp 的用法,一般 frpc 在内网,frps 在外网,不太能理解能访问 frps 的机器什么情况下还需要通过 frpc 机器的网络来访问互联网,这里挺困惑的。 希望能解答一下,谢谢! 说明:我预期是希望内网的其他机器能通过 frpc 机器作为代理访问互联网。 **Can you point out what caused this issue (optional)**
Author
Owner

@fatedier commented on GitHub (Nov 22, 2017):

符合你的预期的是任何一个 http 或者 socks5 proxy。

frp 是反向代理,所以和你的想法是无关的。这里的用途主要是把 frpc 所在的机器当做跳板机,去访问原本访问不到的网络,比如公司内网的一些资源等等。

<!-- gh-comment-id:346419392 --> @fatedier commented on GitHub (Nov 22, 2017): 符合你的预期的是任何一个 http 或者 socks5 proxy。 frp 是反向代理,所以和你的想法是无关的。这里的用途主要是把 frpc 所在的机器当做跳板机,去访问原本访问不到的网络,比如公司内网的一些资源等等。
Author
Owner

@tolbkni commented on GitHub (Nov 23, 2017):

从 reverse proxy 定义来说是对的,可能文档的描述有些误导,没有准确的表达出其他机器指的是外网环境的机器

<!-- gh-comment-id:346538517 --> @tolbkni commented on GitHub (Nov 23, 2017): 从 reverse proxy 定义来说是对的,可能文档的描述有些误导,没有准确的表达出其他机器指的是外网环境的机器
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#409
No description provided.