mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #208] frp 私有模式,多个连接配置,若一个失败,仍旧正常启动的问题 #139
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#139
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 @chmis8000 on GitHub (Dec 30, 2016).
Original GitHub issue: https://github.com/fatedier/frp/issues/208
[common]
server_addr = F1
session = 5062245541
[5062245541A]
local_port=80
remote_port =8001
privilege_mode = true
use_gzip = true
[5062245541B]
local_port=21
remote_port =8002
privilege_mode = true
use_gzip = true
比如,如上若一个remote_port 已经被占用,frpc仍旧正常运行,只是一个报错提示, 是否能立即退出? 我测试ngrok是不允许启动的。这样方便做第三方程序判断,自动再换端口。 若您不愿意改为同ngrok处理, 那建议加一个配置项,让用户决定frpc在这种情况是退出,还是部分运行。
@fatedier commented on GitHub (Dec 31, 2016):
其实你需要解决的是端口被占用的问题,这个可以随机分配一个端口,但是这样你启动之后也不知道被分配的端口是哪个,需要查日志才能看到。可以再想想其他的解决方案。
比如 frpc 增加一个命令,用于检测指定端口是否已经被占用。
@chmis8000 commented on GitHub (Jan 2, 2017):
增加命令增加了复杂度,需要来回2次调用。方案:
1.最简单:还是上面我说的,同ngrok,只要有一个端口占用,frpc就不启动,这样人为或第三方程序判断处理
2.上面的随机方案:但分配的端口号得返回,如文件、socket、http访问、mysql存储之类
@fatedier commented on GitHub (Jan 3, 2017):