Closed KumaTea closed 4 years ago
用docker来实现,开两个镜像,分别来连接不同的frps。
./frpc -c ./frpc1.ini ./frpc -c ./frpc2.ini ./frpc -c ./frpc3.ini ...
如果 frpc 原生支持多开的话,就不使用Docker了。晚点试下。。。
@KumaTea 请问下原生多开服务端找到了吗?
@KumaTea 请问下原声多开服务端找到了吗?
@qins 我当时是这么解决的:
./frpc -c ./d.ini > d.log &
./frpc -c ./f.ini > f.log &
为了确保安全,设置了不同端口;后来也使用 screen
以避免产生 log 文件。
但是后来因为服务不多,就不再使用 frp
了,不清楚现在是否仍然可用。
@KumaTea Thanks 😊 国内云没有备案不让用80端口, 国外VPS的话网络不稳. 目前一直在寻找两全其美的办法
`➜ frp ll
total 8.0K
-rw-r--r-- 1 root root 687 Mar 2 10:36 frpc_ali.ini
-rw-r--r-- 1 root root 1.2K Mar 2 10:37 frpc_aws.ini
➜ frp pwd
/etc/frp
➜ frp cat /etc/systemd/system/frpc@.service
[Unit]
Description=Frp Client Service
After=network.target
[Service] Type=idle User=nobody Restart=on-failure RestartSec=5s ExecStart=/usr/bin/frpc -c /etc/frp/%i.ini ExecReload=/usr/bin/frpc reload -c /etc/frp/%i.ini
[Install] WantedBy=multi-user.target ➜ frp systemctl enable --now frpc@frpc_ali ➜ frp systemctl enable --now frpc@frpc_aws ➜ ~ ps -aux | grep frpc nobody 79012 0.1 0.0 713712 8908 ? Ssl 10:48 0:00 /usr/bin/frpc -c /etc/frp/frpc_ali.ini nobody 79100 0.1 0.0 712048 8184 ? Ssl 10:48 0:00 /usr/bin/frpc -c /etc/frp/frpc_aws.ini
` 分别指定配置文件就可以了 遇到同样问题,寻遍google未解。 看到包里的frpc@.service,我陷入了深思,然后就发现了这个用法
`➜ frp ll total 8.0K -rw-r--r-- 1 root root 687 Mar 2 10:36 frpc_ali.ini -rw-r--r-- 1 root root 1.2K Mar 2 10:37 frpc_aws.ini ➜ frp pwd /etc/frp ➜ frp cat /etc/systemd/system/frpc@.service [Unit] Description=Frp Client Service After=network.target
[Service] Type=idle User=nobody Restart=on-failure RestartSec=5s ExecStart=/usr/bin/frpc -c /etc/frp/%i.ini ExecReload=/usr/bin/frpc reload -c /etc/frp/%i.ini
[Install] WantedBy=multi-user.target ➜ frp systemctl enable --now frpc@frpc_ali ➜ frp systemctl enable --now frpc@frpc_aws ➜ ~ ps -aux | grep frpc nobody 79012 0.1 0.0 713712 8908 ? Ssl 10:48 0:00 /usr/bin/frpc -c /etc/frp/frpc_ali.ini nobody 79100 0.1 0.0 712048 8184 ? Ssl 10:48 0:00 /usr/bin/frpc -c /etc/frp/frpc_aws.ini
` 分别指定配置文件就可以了 遇到同样问题,寻遍google未解。 看到包里的frpc@.service,我陷入了深思,然后就发现了这个用法
强强强
Version 0.30.0
OS Ubuntu 18.04 LTS x86-64
How to run two
frpc
(frp client) separately? 如何同时运行两个frpc
客户端,分别连接不同的frps
服务端?问题描述:
有一台境外主机 (F),一台境内主机 (D),均运行 frps 。
在D上,如果希望:
www.d.mydomain.com
) 等服务backend.f.mydomain.com
由于目前 frpc 的配置文件内只支持配置一个服务器地址,这种情况有较好的解决方案或开发计划吗?