Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

访问内网web不通过域名 #75

Closed
jacobzeng opened this issue Aug 14, 2016 · 14 comments
Closed

访问内网web不通过域名 #75

jacobzeng opened this issue Aug 14, 2016 · 14 comments

Comments

@jacobzeng
Copy link

你好,首先感谢提供这样的工具。
我之前是通过ssh隧道来把我内网的web应用映射出去,现在换成你这个工具,但是我没有域名,只想通过ip,即没有配置custom_domains,可以实现吗?或者是现在已经支持了,如何配置?

@fatedier
Copy link
Owner

代理类型使用 tcp,相当于直接端口转发(参考转发 ssh 端口的示例),映射一个公网的 ip:port 到你内网的 web 应用。

@jacobzeng
Copy link
Author

jacobzeng commented Aug 14, 2016

收到,试试,这样说感觉应该可以,thanks

@jacobzeng
Copy link
Author

jacobzeng commented Aug 15, 2016

我本地是启动的nginx监听的80端口,再启动frpc就提示下面的错误
2016/08/15 08:35:24 [main.go:109][I] Start frpc success
2016/08/15 08:35:24 [control.go:181][E] ProxyName [ssh], start proxy error, ProxyName [ssh], start proxy error: listen tcp 0.0.0.0:80: bind: address already in use

frpc.ini

[ssh]
type = tcp
local_port = 80
use_encryption = true
use_gzip = false
pool_count = 10

@jacobzeng
Copy link
Author

补充一下,我local machine是window

@fatedier
Copy link
Owner

这个提示和本地的 nginx 无关,是远程 frps 返回的错误信息,表示远程服务器的 80 端口已经被占用了,你可以换一个其他端口。

@jacobzeng
Copy link
Author

jacobzeng commented Aug 15, 2016

这个我也检查过frpc.log,确实有这个日志,但是我check过remote machine上没有80被占用,启动了frpc后,是被frpc进程占用的,我再仔细检查下,thanks

@fatedier
Copy link
Owner

fatedier commented Aug 15, 2016

这个日志是 frpc 注册到 frps 上失败后,frps 返回的信息, 你的 vhost_http_port 是不是设置成 80 端口了?

@jacobzeng
Copy link
Author

搞定了,是下面这个配置导致frps自己占用了80端口,然后我映射的tcp也是80端口,就冲突了
vhost_http_port = 80

@RukawaKaede
Copy link

你好,我也遇到了相同的需求,没有域名,请教一下配置文件详细信息,谢谢!

@iwestlin
Copy link

iwestlin commented May 16, 2018

@RukawaKaede
frps.ini

[common]
bind_port = 7000

frpc.ini

[common]
server_addr = aaa.bbb.ccc.ddd
server_port = 7000

[tcp_port]
type = tcp
local_ip = 127.0.0.1
local_port = 2333
remote_port = 3333

然后就可以在外网通过 http://aaa.bbb.ccc.ddd:3333 访问到内网机器里的 http://127.0.0.1:2333

@RukawaKaede
Copy link

@iwestlin
谢谢!成功了。

@YanceyShi
Copy link

按照上面的配置没有域名的,提示:
The webpage at http://xxxxxxxxxx:xxxx/ might be temporarily down or it may have moved permanently to a new web address.

@immortif
Copy link

按照上面的配置没有域名的,提示:
The webpage at http://xxxxxxxxxx:xxxx/ might be temporarily down or it may have moved permanently to a new web address.

我也出现了同样的问题,但只有当remote_port = 6000时出现这个错误提示。我把remote_port设置为80,8080,6001时全部运转成功。

@imydou
Copy link

imydou commented Mar 29, 2020

我遇到的是80、443提示port unavailable。调试一番发现是因为frps没用root用户运行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants