mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1003] frpc连接frps成功,内网穿透访问失败 #793
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#793
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @droplet-js on GitHub (Dec 10, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/1003
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)?
What operating system and processor architecture are you using (
go env)?docker: hyperapp/frp
Configures you used:
frps.ini
frpc.ini
Steps to reproduce the issue:
Describe the results you received:
2.内网穿透访问失败
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
frpc log
frps log
Can you point out what caused this issue (optional)
@fatedier commented on GitHub (Dec 10, 2018):
请先自行排查问题。
@droplet-js commented on GitHub (Dec 10, 2018):
排查好几遍了,尝试了改 docker 容器的网络模式为 host,然而并没有用 ...
@droplet-js commented on GitHub (Dec 10, 2018):
改成这样依然没用,该有的端口都映射到本地了
@fatedier commented on GitHub (Dec 10, 2018):
先不要用 docker,把 frpc 和 frps 放在同一台物理机上验证配置是否正确,是否能够正常工作。
再在 docker 环境里做验证,用排除法排查问题。
@droplet-js commented on GitHub (Dec 11, 2018):
问题找到并解决了,是traefik配置问题。建议frp也弄出一套类似traefik,利用command或environment配置frps,利用labels配置frpc。
@fatedier commented on GitHub (Dec 11, 2018):
环境变量可以考虑。
@droplet-js commented on GitHub (Dec 11, 2018):
请教一下 7000 端口用的 TCP 协议还是 UDP 协议?我想用 traefik 转发,避免服务器多开一个 7000 端口。
@fatedier commented on GitHub (Dec 11, 2018):
tcp
@Tiger-zzZ commented on GitHub (May 16, 2019):
能请问一下frp在swarm中启动时需要什么label吗,我不知道怎样让frpc访问到frps
@droplet-js commented on GitHub (May 17, 2019):
@Tiger-zzZ
traefik
frps
frpc-http
frpc-ssh
@Tiger-zzZ commented on GitHub (May 17, 2019):
我在traefik用文档中swarm mode的案例起的
docker-machine ssh manager "docker service create \ --name traefik \ --constraint=node.role==manager \ --publish 80:80 --publish 8080:8080 \ --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \ --network traefik-net \ traefik \ --docker \ --docker.swarmMode \ --docker.domain=traefik \ --docker.watch \ --api"然后这是我的frps
docker service create --name frps --label traefik.vhost.backend=vhost --label traefik.vhost.port=80 --label traefik.vhost.frontend.entryPoints=http --publish 7000:7000 frp-server现在我可以通过7000端口连接上frps,但是不能通过访问到客户端服务,请问这是应怎么配置
@droplet-js commented on GitHub (May 17, 2019):
-_-||| ... 纯 docker 命令看得好蛋疼啊,能用docker-compose么?
@Tiger-zzZ commented on GitHub (May 17, 2019):
还不太熟悉compose,期望是通过80端口能够直接访问到我frpc上的nginx,在本地测试中不知道怎么样让traefik转发请求
@droplet-js commented on GitHub (May 17, 2019):
-_-||| ... 直接上我上面发的配置就好了,从swarm的网络创建到 frpc-demo 都能直接用 docker-compose
@Tiger-zzZ commented on GitHub (May 17, 2019):
谢谢,我在去试试,万分感谢
@Tiger-zzZ commented on GitHub (May 24, 2019):
非常不好意思,最后在问你一次,能不能只在traefik上开7000端口然后直接连接,frps那个容器不暴露端口
@droplet-js commented on GitHub (May 24, 2019):
暂时还不行,因为 traefik 2.0 之前不支持 tcp 转发。不过,希望快临近了,traefik 2.0 已经 alpha-4 了,离正式发布不久了,再忍忍咯 ... 我都忍了大半年了,就等 traefik 发布 release 版本了
@Tiger-zzZ commented on GitHub (May 24, 2019):
万分感谢