Skip to content

Commit

Permalink
Merge pull request #4 from gofrp/fix_ci
Browse files Browse the repository at this point in the history
fix: doc
  • Loading branch information
blizard863 authored Apr 12, 2024
2 parents 33684de + ab8dffb commit f3b56dd
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 22 deletions.
67 changes: 52 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,87 @@

# Introduction

Starting from version v0.53.0, frp has supported the ssh tunnel mode [ssh tunnel gateway](https://github.com/fatedier/frp?tab=readme-ov-file#ssh-tunnel-gateway). Users can communicate with frps using the standard ssh protocol to accomplish reverse proxying. This mode operates independently from the frpc binary.
As of version v0.53.0, frp has supported the ssh tunnel mode [ssh tunnel gateway](https://github.com/fatedier/frp?tab=readme-ov-file#ssh-tunnel-gateway). Users can communicate with frps using the standard ssh protocol to accomplish reverse proxying. This mode operates independently from the frpc binary.

Many users need to use reverse proxying on low-end computers or embedded devices. These pieces of hardware have limited memory and storage space and may struggle to operate the original version of frpc normally. This project aims to provide the simplest version of a reverse proxy, which communicates with frps via the ssh protocol to complete reverse proxying.
Many users need to use reverse proxying on low-end computers or embedded devices. These machines have limited memory and storage space, and as a result, may struggle to operate the original version of frpc normally. This project aims to provide the simplest possible implementation of a reverse proxy, achieving reverse proxying solely through the ssh protocol in conjunction with frps.

We offer two binary programs: the native ssh version (tiny-frpc-ssh) and the standalone version (tiny-frpc). Both these programs parse the frpc toml file (conf/frpc_full_example.toml) and complete reverse proxying via communication with frps.
We offer two binary programs: the native ssh version (tiny-frpc-ssh) and the standalone version (tiny-frpc). Both of these programs parse the frpc's toml file (conf/frpc_full_example.toml) to complete reverse proxying via communication with frps.

* The native ssh version requires an ssh program on your machine, otherwise, it cannot be used. This binary file is smaller.
* The native ssh version requires that your machine already has an ssh program installed; otherwise, it cannot be used. This binary file is smaller.

* The standalone version does not rely on any ssh program installed on your machine. This binary file is larger.
* The standalone version does not rely on any ssh program on your local machine. Consequently, this binary file is larger.


# Usage

## 1. Download and uncompress the tiny-frpc version that corresponds to your needs
Users have the choice between the native ssh version or the standalone version. Please navigate to this project's [releases](https://github.com/gofrp/tiny-frpc/releases) to download.
## 1. Download tiny-frpc
Users decide whether to use the native ssh version or the standalone version. Please navigate to this project's [releases](https://github.com/gofrp/tiny-frpc/releases) to download.

## 2. Prepare the frpc toml file (within the decompressed package you'll find a simple usage configuration, for full configuration refer to conf/frpc_full_example.toml in this project)

## 2. Prepare the frpc toml file
Note: This project only supports the toml file format.
After decompressing the package, there will be a minimal usage configuration. For a full configuration, refer to this project's conf/frpc_full_example.toml.

For example, the minimal configuration of frps is:
```
# frps.toml
bindPort = 7000
vhostHTTPPort = 80
For example:
sshTunnelGateway.bindPort = 2200
```
serverAddr = "127.0.0.1"

And the configuration for tiny-frpc is:
```
# frpc.toml
serverAddr = "x.x.x.x"
# frps ssh tunnel gateway port
serverPort = 2200
[[proxies]]
name = "test-tcp"
name = "test-tcp-server"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
localPort = 5000
remotePort = 6000
[[proxies]]
name = "test-http-web"
type = "http"
localIP = "127.0.0.1"
localPort = 7080
customDomains = ["test-tiny-frpc.frps.com"]
locations = ["/", "/pic"]
```

## 3. Run
## 3. Running
> ./tiny-frpc -c frpc.toml
or

> ./tiny-frpc-ssh -c frpc.toml
And just like that, the reverse proxy is set up.
For TCP service:

> nc -zv x.x.x.x 6000
or

> telnet x.x.x.x 6000
You can test whether the intranet port has been successfully proxying to the public network. If it has, you can access the TCP service from the public network.

For HTTP service:

Assuming that the domain name 'test-tiny-frpc.frps.com' is resolved to the machine where frps resides, you can access the intranet's HTTP services through:

> curl -v 'http://test-tiny-frpc.frps.com/'

# Disclaimer

**This is currently a preview version. Compatibility is not guaranteed. It is currently intended for testing purposes only and should not be used in production environments!!!**
**This is currently a preview version. Compatibility is not guaranteed. It is presently for testing purposes only and should not be used in production environments!**
56 changes: 49 additions & 7 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ frp 在 >= v0.53.0 版本已经支持 ssh tunnel 模式 [ssh tunnel gateway](htt

很多用户需要在一些低配计算机或嵌入式设备里使用反向代理,这些机器内存和存储空间有限,可能无法正常使用原版的 frpc。本项目旨在提供最简版本的反向代理,只通过 ssh 协议与 frps 完成反向代理。

我们提供了2种二进制程序,native ssh 的版本(tiny-frpc-ssh)和 standalone 版本(tiny-frpc)。2种程序都是解析 frpc toml 文件(conf/frpc_full_example.toml),与 frps 的通信完成反向代理
我们提供了2种二进制程序,native ssh 的版本(tiny-frpc-ssh)和 standalone 版本(tiny-frpc)。2种程序都是解析 frpc toml 文件(conf/frpc_full_example.toml),与 frps 通信完成反向代理

* native ssh 版本需要你本机已经有 ssh 程序,否则无法使用。 该二进制文件较小。

Expand All @@ -15,26 +15,50 @@ frp 在 >= v0.53.0 版本已经支持 ssh tunnel 模式 [ssh tunnel gateway](htt

# 使用

## 1. 下载对应的 tiny-frpc 版本并解压
## 1. 下载 tiny-frpc
用户自己决定是用 native ssh 版本还是 standalone 版本。请移步到本项目的 [releases](https://github.com/gofrp/tiny-frpc/releases) 下载。


## 2. 准备 frpc toml 文件 (压缩包解压之后里面有最简使用配置,完整配置参考本项目 conf/frpc_full_example.toml)
## 2. 准备 frpc toml 文件
注意:本项目只支持 toml 文件格式。
压缩包解压之后,里面有最简使用配置,完整配置参考本项目 conf/frpc_full_example.toml

举个例子:

frps 的最简配置:
```
# frps.toml
bindPort = 7000
vhostHTTPPort = 80
sshTunnelGateway.bindPort = 2200
```
serverAddr = "127.0.0.1"

tiny-frpc 的配置:
```
# frpc.toml
serverAddr = "x.x.x.x"
# frps ssh tunnel gateway port
serverPort = 2200
[[proxies]]
name = "test-tcp"
name = "test-tcp-server"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
localPort = 5000
remotePort = 6000
[[proxies]]
name = "test-http-web"
type = "http"
localIP = "127.0.0.1"
localPort = 7080
customDomains = ["test-tiny-frpc.frps.com"]
locations = ["/", "/pic"]
```

## 3. 运行
Expand All @@ -44,7 +68,25 @@ or

> ./tiny-frpc-ssh -c frpc.toml
即可在完成反向代理。

TCP 服务:

> nc -zv x.x.x.x 6000
or

> telnet x.x.x.x 6000
可以测试内网端口是否已经成功代理到公网。如果通了,可以在公网访问 TCP 服务了。

HTTP 服务:

假设 test-tiny-frpc.frps.com 域名解析到 frps 所在的机器,则可以通过

> curl -v 'http://test-tiny-frpc.frps.com/'
访问到内网的 HTTP 服务。



# 说明
Expand Down

0 comments on commit f3b56dd

Please sign in to comment.