Skip to content

Commit

Permalink
feat: add ssh doc
Browse files Browse the repository at this point in the history
  • Loading branch information
int7 committed Dec 13, 2023
1 parent fc97974 commit e37e054
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,39 @@ Read the [document](/doc/server_plugin.md).

Find more plugins in [gofrp/plugin](https://github.com/gofrp/plugin).

### SSH Tunnel Gateway
*added in v0.53.0*

frp supports listening to an SSH port on the frps side and achieves TCP protocol proxying through the SSH -R protocol, without relying on frpc.

```toml
# frps.toml
sshTunnelGateway.bindPort = 2200
```

When running ./frps -c frps.toml, a private key file named .autogen_ssh_key will be automatically created in the current working directory. This generated private key file will be used by the SSH server in frps.

Executing the command
> ssh -R :80:127.0.0.1:8080 v0@{frp address} -p 2200 tcp --proxy_name "test-tcp" --remote_port 9090
sets up a proxy on frps that forwards the local 8080 service to the port 9090.

```bash
frp (via SSH) (Ctrl+C to quit)

User:
ProxyName: test-tcp
Type: tcp
RemoteAddress: :9090

```

This is equivalent to:
> frpc tcp --proxy_name "test-tcp" --local_ip 127.0.0.1 --local_port 8080 --remote_port 9090

Find more arguments in [gofrp ssh tunnel gateway](TODO).

## Contributing

Interested in getting involved? We would like to help you!
Expand Down

0 comments on commit e37e054

Please sign in to comment.