Total Pageviews

Monday, 18 November 2019

xfrp和xfrps

frp client for openwrt&LEDE.

What is xfrp and why start xfrp

xfrp is xfrps client implemented by c for OpenWRT and LEDE system
The motivation to start xfrp project is that we are OpenWRTer, and openwrt usually ran in device which has little ROM and RAM space, however golang always need more space and memory; therefore we start xfrp project.

Compile

xfrp need libevent openssl-dev and json-c support
Before compile xfrp, please install libevent openssl-dev and json-c in your system.
git clone https://github.com/KunTengRom/xfrp.git
cd xfrp
cmake .
make

Quick start

before using xfrp, you should have built the proxy server: xfrps, It's no difference with frp at usage, but support FTP and more embedded-client-friendly for linux.
Run in debug mode :
xfrpc -c frpc_mini.ini -f -d 7 
Run in release mode :
xfrpc -c frpc_mini.ini -d 0

FTP support

xfrp support ftp proxy after version 0.07.451. Hypothesize you have built xfrps succeed!
Configure ftp in frpc.ini
[common]
server_addr = 111.112.113.114
server_port = 7001

[router_ftp_example]
type = ftp
local_port = 21
remote_port = 30621
remote_data_port = 30622
remote_port is the reporxy port of FTP command tunnel, and remote_data_port is FTP-DATA port reporxy.
Use -p (PASV Mode) of ftp command to connect to proxy ftp server:
ftp -p 111.112.113.114 30621
In Master version server_addr can use domain name intead of IP address in FTP proxy. Issue #4 and Issue #5.

from https://github.com/KunTengRom/xfrp
------

xfrps forks from https://github.com/fatedier/frp
but mainly use its server side feature and cooperate with xfrp.

What is xfrps and why xfrps

xfrps was xfrp's server, it was a branch of frp which mainly focus on serving amount of routers and IOT devices
The reason to start xfrps project is the following:
1, we need a stable frp server to serve our xfrp, however frp change very fast, high version of frp doesn't promise compatible with low version
2, frp's roadmap doesn't satisfy xfrp's need, for example, ftp support is important for us, but frp didn't support it
3, by maintaining our own frp server project, we can develope our own feature, no need to wait frp's support

Difference between xfrps and frp

xfrps start from v0.11.0 of frp, the following is difference:

xfrps need client provide runid, if not, it will reject it.

xfrps support only one tcp&ftp proxy for every client, and xfrps'client don't need to provide its remote port, xfrps will choose one for it

client can use its runid to get its tcp&ftp proxy's remote port by http request
for example curl http://xfrps_domains:7500/api/port/tcp/getport/your_runid

xfrps support ftp

in order to use ftp proxy, u need add the following content to config file
type = ftp
local_ip = your ftp server ip
local_port = 21
to get ftp remote port, using the following http request:
curl http://xfrps_domains:7500/api/port/tcp/getftpport/your_runid

from https://github.com/KunTengRom/xfrps
------

相关帖子:https://briteming.blogspot.com/2017/05/frp.html