mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-06-08 13:29:56 +00:00
Fix README
This commit is contained in:
parent
c4c2a4ba28
commit
a722c6cd2e
12
README.md
12
README.md
@ -27,26 +27,26 @@ A TLS certificate (not necessarily issued by a trusted CA) is required on the se
|
||||
|
||||
Client:
|
||||
```
|
||||
./cmd_linux_amd64 proxy client -server example.com:36712 -socks5-addr localhost:1080 -up-mbps 10 down-mbps 50 -obfs BlueberryFaygo
|
||||
./cmd_linux_amd64 proxy client -server example.com:36712 -socks5-addr localhost:1080 -up-mbps 10 -down-mbps 50 -obfs BlueberryFaygo
|
||||
```
|
||||
This will start a SOCKS5 proxy server on the client's localhost TCP 1080 available for use by other programs.
|
||||
|
||||
`-up-mbps 10 down-mbps 50` tells the server that your bandwidth is 50 Mbps down, 10 Mbps up. Properly setting the client's upload and download speeds based on your network conditions is essential for it to work at optimal performance!
|
||||
`-up-mbps 10 -down-mbps 50` tells the server that your bandwidth is 50 Mbps down, 10 Mbps up. Properly setting the client's upload and download speeds based on your network conditions is essential for it to work at optimal performance!
|
||||
|
||||
### Relay
|
||||
|
||||
Suppose you have a TCP program on your server side network at `192.168.1.101:8080` that you want to forward.
|
||||
Suppose you have a TCP program on your server at `localhost:8080` that you want to forward.
|
||||
|
||||
Server:
|
||||
```
|
||||
./cmd_linux_amd64 relay server -listen :36712 -remote 192.168.1.101:8080 -cert example.crt -key example.key
|
||||
./cmd_linux_amd64 relay server -listen :36712 -remote localhost:8080 -cert example.crt -key example.key
|
||||
```
|
||||
|
||||
Client:
|
||||
```
|
||||
./cmd_linux_amd64 relay client -server example.com:36712 -listen localhost:8080 -up-mbps 10 down-mbps 50
|
||||
./cmd_linux_amd64 relay client -server example.com:36712 -listen localhost:8080 -up-mbps 10 -down-mbps 50
|
||||
```
|
||||
All connections to client's localhost TCP 8080 will pass through the relay and connect to the server's `192.168.1.101:8080`
|
||||
All connections to client's localhost TCP 8080 will pass through the relay and connect to the server's `localhost:8080`
|
||||
|
||||
Some users may attempt to forward other encrypted proxy protocols such as Shadowsocks with relay. While this totally works, it's not optimal from a performance standpoint - our protocol itself uses TLS, considering that the proxy protocols being forwarded are also encrypted, and the fact that users mainly use them for HTTPS connections nowadays, you are essentially doing triple encryption. If you need a proxy, use our proxy mode.
|
||||
|
||||
|
12
README.zh.md
12
README.zh.md
@ -25,26 +25,26 @@ Hysteria 是专门针对恶劣网络环境(常见于在中国访问海外服
|
||||
|
||||
客户端
|
||||
```
|
||||
./cmd_linux_amd64 proxy client -server example.com:36712 -socks5-addr localhost:1080 -up-mbps 10 down-mbps 50 -obfs BlueberryFaygo
|
||||
./cmd_linux_amd64 proxy client -server example.com:36712 -socks5-addr localhost:1080 -up-mbps 10 -down-mbps 50 -obfs BlueberryFaygo
|
||||
```
|
||||
在客户端的本地 TCP 1080 上启动一个 SOCKS5 代理服务器供其他程序使用。
|
||||
|
||||
`-up-mbps 10 down-mbps 50` 是告诉服务端你的下行速度为 50 Mbps, 上行 10 Mbps。根据实际网络条件正确设置客户端的上传和下载速度十分重要!
|
||||
`-up-mbps 10 -down-mbps 50` 是告诉服务端你的下行速度为 50 Mbps, 上行 10 Mbps。根据实际网络条件正确设置客户端的上传和下载速度十分重要!
|
||||
|
||||
### 转发
|
||||
|
||||
假设你想转发服务端网络上 `192.168.1.101:8080` 的一个 TCP 协议程序。
|
||||
假设你想转发服务端上 `localhost:8080` 的一个 TCP 协议程序。
|
||||
|
||||
服务端
|
||||
```
|
||||
./cmd_linux_amd64 relay server -listen :36712 -remote 192.168.1.101:8080 -cert example.crt -key example.key
|
||||
./cmd_linux_amd64 relay server -listen :36712 -remote localhost:8080 -cert example.crt -key example.key
|
||||
```
|
||||
|
||||
客户端
|
||||
```
|
||||
./cmd_linux_amd64 relay client -server example.com:36712 -listen localhost:8080 -up-mbps 10 down-mbps 50
|
||||
./cmd_linux_amd64 relay client -server example.com:36712 -listen localhost:8080 -up-mbps 10 -down-mbps 50
|
||||
```
|
||||
所有到客户端本地 TCP 8080 的 TCP 连接都将通过转发,到服务器连接那里的 `192.168.1.101:8080`
|
||||
所有到客户端本地 TCP 8080 的 TCP 连接都将通过转发,到服务器连接那里的 `localhost:8080`
|
||||
|
||||
有些用户可能会尝试用这个功能转发其他加密代理协议,比如Shadowsocks。虽然这完全可行,但从性能的角度并不是最佳选择 - 我们的协议本身就有 TLS,转发的代理协议也是加密的,再加上用户用来访问 HTTPS 网站,等于做了三重加密。如果需要代理就用我们的代理模式。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user