[GH-ISSUE #2108] [Feature request] Private ipv6 host plugin via stcp #1673

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

Originally created by @hathlife on GitHub (Nov 24, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/2108

The solution you want
现在三大运营商家庭宽带ipv6差不多快全面普及了,为了方便访问自己家的ipv6地址,目前通行的做法是通过ddns服务商解析域名,然而这样会带来两个问题:1.在域名商的域名记录容易被第三方利用发动攻击,从而降低动态ipv6地址的安全性。2.后续监管部门很可能对家宽的ipv6域名解析做出一些限制。因此,若只需满足自己的访问需求,可以利用Frp的stcp功能,实现在私密条件下动态维护自己家庭宽带ipv6地址在Frpc运行设备上的host记录,避免了上述问题。
Alternatives considered
暂无

How to implement this function
实现一个private_host插件,并仅在stcp模式下加载,负责处理读取设备可用ipv6地址,匹配预设私有host记录并发送,visitor端接收并写入设备host记录(需要平台相应权限)的功能。
一组private_host配置文件如下所示:

#需要解析的设备上的frpc.ini
[A.ipv6.private]  
type = stcp
sk = abcdefg
plugin = private_host
private_domain = A.ipv6.private.frp
#需要访问所解析的设备上的frpc.ini
[A.ipv6.private.visitor]  
type = stcp
sk = abcdefg
server_name = A.ipv6.private
plugin = private_host

Application scenarios of this function
A端frpc加载插件 -> A端ipv6地址(重)分配 -> A端frpc轮询读取地址 -> 匹配域名记录并通过stcp隧道发送 -> visitor端接收到域名记录并写入host(Android: 通过VPNservice提供通用实现)-> B端其他应用通过host记录实现域名直连A端相应服务。

Originally created by @hathlife on GitHub (Nov 24, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/2108 <!-- From Chinese to English by machine translation, welcome to revise and polish. --> **The solution you want** 现在三大运营商家庭宽带ipv6差不多快全面普及了,为了方便访问自己家的ipv6地址,目前通行的做法是通过ddns服务商解析域名,然而这样会带来两个问题:1.在域名商的域名记录容易被第三方利用发动攻击,从而降低动态ipv6地址的安全性。2.后续监管部门很可能对家宽的ipv6域名解析做出一些限制。因此,若只需满足自己的访问需求,可以利用Frp的stcp功能,实现在私密条件下动态维护自己家庭宽带ipv6地址在Frpc运行设备上的host记录,避免了上述问题。 **Alternatives considered** 暂无 **How to implement this function** 实现一个private_host插件,并仅在stcp模式下加载,负责处理读取设备可用ipv6地址,匹配预设私有host记录并发送,visitor端接收并写入设备host记录(需要平台相应权限)的功能。 一组private_host配置文件如下所示: ```ini #需要解析的设备上的frpc.ini [A.ipv6.private] type = stcp sk = abcdefg plugin = private_host private_domain = A.ipv6.private.frp ``` ```ini #需要访问所解析的设备上的frpc.ini [A.ipv6.private.visitor] type = stcp sk = abcdefg server_name = A.ipv6.private plugin = private_host ``` **Application scenarios of this function** A端frpc加载插件 -> A端ipv6地址(重)分配 -> A端frpc轮询读取地址 -> 匹配域名记录并通过stcp隧道发送 -> visitor端接收到域名记录并写入host(Android: 通过VPNservice提供通用实现)-> B端其他应用通过host记录实现域名直连A端相应服务。
gitea-mirror 2026-05-05 13:04:19 -06:00
  • closed this issue
  • added the
    proposal
    label
Author
Owner

@fatedier commented on GitHub (Nov 25, 2020):

想法挺好,但是这看起来并不是 frp 应该做的功能,更像是一个 DDNS 的项目负责的事情,我们目前还没有打算做 DDNS 相关的功能。如果之后会做的话,可以考虑类似的解决方案,但是放在 stcp 里也不是很合适,stcp 的本意是让 visitor 可以安全的访问 server。

<!-- gh-comment-id:733445012 --> @fatedier commented on GitHub (Nov 25, 2020): 想法挺好,但是这看起来并不是 frp 应该做的功能,更像是一个 DDNS 的项目负责的事情,我们目前还没有打算做 DDNS 相关的功能。如果之后会做的话,可以考虑类似的解决方案,但是放在 stcp 里也不是很合适,stcp 的本意是让 visitor 可以安全的访问 server。
Author
Owner

@hathlife commented on GitHub (Dec 8, 2020):

Workaround [linux A/B end only] : stcp模式下B端用crontab定时执行以下指令:

ssh -p [stcp-port] root@localhost " ip a | grep [各大运营商ipv6地址前缀] | sed -n \"2p\" " | awk -F ' ' '{print $2}' | sed s'/\/64$//'

如果用frp插件实现的话应该可以实现平台无关。

<!-- gh-comment-id:740719910 --> @hathlife commented on GitHub (Dec 8, 2020): Workaround [linux A/B end only] : stcp模式下B端用crontab定时执行以下指令: ```shell ssh -p [stcp-port] root@localhost " ip a | grep [各大运营商ipv6地址前缀] | sed -n \"2p\" " | awk -F ' ' '{print $2}' | sed s'/\/64$//' ``` 如果用frp插件实现的话应该可以实现平台无关。
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#1673
No description provided.