I'm trying to use mosh combined with third-party platform's frp service to connect to a remote machine (WSL) which is placed home. The mosh client is set on my Ipad's Blink Shell. The frpc ini config is like below:
# mosh.ini
[common]
user = aaa
sakura_mode = true
use_recover = true
login_fail_exit = false
protocol = tcp
tcp_mux = true
pool_count = 1
# for upstream 0.50.0+
tls_enable = false
disable_custom_tls_first_byte = false
token = SakuraFrpClientToken
server_addr = frp-server-ip
server_port = 7000
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 22818
[mosh]
type = udp
local_ip = 127.0.0.1
local_port = 60002
remote_port = 24132
On Blink Shell side, the ssh port is configed as 22818 and mosh port is 24132.
The ssh connection successed but mosh didn't. The mosh client can't recive any UDP packet from frp-server-ip:24132 and finally terminated itself.
The firewall is opened while iptables chain is listed below:
wsl> sudo iptables-legacy -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere multiport dports 60000:61000
I'm sure the frp relay has been working well since I've checked frp server status and frp client output message which is like below:
2023/09/13 23:43:35 [I] [root.go:220] start frpc service for config file [/path/mosh.ini]
...
2023/09/13 23:43:36 [I] ...
incoming a new work connection for udp proxy, x.x.x.x:7000
I managed to use mosh on WSL to connect itself through mosh -p 60002 localhost which is ok.
I have also tried to manually start mosh-server and copy the MOSH-KEY, then execute MOSH-KEY=xxx mosh-client frp-server-ip 24132 which also failed.
Is there some restrictions for using mosh through frp? I'm wondering an available blink-mosh-frp solution to remotely reach my computer at home since it's really convenient.