mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
vmess: add docs for vmess
This commit is contained in:
parent
c8ca1f0b25
commit
922462ffe8
16
README.md
16
README.md
@ -30,6 +30,8 @@ Forward (local proxy client/upstream proxy server):
|
|||||||
- Http proxy(tcp)
|
- Http proxy(tcp)
|
||||||
- SS proxy(tcp&udp&uot)
|
- SS proxy(tcp&udp&uot)
|
||||||
- SSR proxy(tcp)
|
- SSR proxy(tcp)
|
||||||
|
- VMess proxy(tcp)
|
||||||
|
- TLS, use together with above proxy protocols(tcp)
|
||||||
|
|
||||||
DNS Forwarding Server (udp2tcp):
|
DNS Forwarding Server (udp2tcp):
|
||||||
- Listen on UDP and forward dns requests to remote dns server in TCP via forwarders
|
- Listen on UDP and forward dns requests to remote dns server in TCP via forwarders
|
||||||
@ -89,7 +91,7 @@ glider -config CONFIGPATH -listen :8080 -verbose
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
```bash
|
```bash
|
||||||
glider v0.5.2 usage:
|
glider v0.6.0 usage:
|
||||||
-checkduration int
|
-checkduration int
|
||||||
proxy check duration(seconds) (default 30)
|
proxy check duration(seconds) (default 30)
|
||||||
-checkwebsite string
|
-checkwebsite string
|
||||||
@ -121,6 +123,7 @@ Available Schemes:
|
|||||||
socks5: socks5 proxy
|
socks5: socks5 proxy
|
||||||
http: http proxy
|
http: http proxy
|
||||||
ssr: ssr proxy
|
ssr: ssr proxy
|
||||||
|
vmess: vmess proxy
|
||||||
redir: redirect proxy. (used on linux as a transparent proxy with iptables redirect rules)
|
redir: redirect proxy. (used on linux as a transparent proxy with iptables redirect rules)
|
||||||
tcptun: tcp tunnel
|
tcptun: tcp tunnel
|
||||||
udptun: udp tunnel
|
udptun: udp tunnel
|
||||||
@ -129,7 +132,7 @@ Available Schemes:
|
|||||||
|
|
||||||
Available schemes for different modes:
|
Available schemes for different modes:
|
||||||
listen: mixed ss socks5 http redir tcptun udptun uottun dnstun
|
listen: mixed ss socks5 http redir tcptun udptun uottun dnstun
|
||||||
forward: ss socks5 http ssr
|
forward: ss socks5 http ssr vmess
|
||||||
|
|
||||||
SS scheme:
|
SS scheme:
|
||||||
ss://method:pass@host:port
|
ss://method:pass@host:port
|
||||||
@ -141,6 +144,12 @@ Available methods for ss:
|
|||||||
SSR scheme:
|
SSR scheme:
|
||||||
ssr://method:pass@host:port?protocol=xxx&protocol_param=yyy&obfs=zzz&obfs_param=xyz
|
ssr://method:pass@host:port?protocol=xxx&protocol_param=yyy&obfs=zzz&obfs_param=xyz
|
||||||
|
|
||||||
|
VMess scheme:
|
||||||
|
vmess://uuid[:method]@host:port?alterID=num
|
||||||
|
|
||||||
|
Available methods for vmess:
|
||||||
|
NONE, (will add aes-128-gcm and chacha20-poly1305 later)
|
||||||
|
|
||||||
Available forward strategies:
|
Available forward strategies:
|
||||||
rr: Round Robin mode
|
rr: Round Robin mode
|
||||||
ha: High Availability mode
|
ha: High Availability mode
|
||||||
@ -176,6 +185,9 @@ Examples:
|
|||||||
glider -listen redir://:1081 -forward "ssr://method:pass@1.1.1.1:8444?protocol=a&protocol_param=b&obfs=c&obfs_param=d"
|
glider -listen redir://:1081 -forward "ssr://method:pass@1.1.1.1:8444?protocol=a&protocol_param=b&obfs=c&obfs_param=d"
|
||||||
-listen on :1081 as a transparent redirect server, forward all requests via remote ssr server.
|
-listen on :1081 as a transparent redirect server, forward all requests via remote ssr server.
|
||||||
|
|
||||||
|
glider -listen redir://:1081 -forward "tls://1.1.1.1:443,vmess://user:method@?alterID=10"
|
||||||
|
-listen on :1081 as a transparent redirect server, forward all requests via remote vmess server.
|
||||||
|
|
||||||
glider -listen tcptun://:80=2.2.2.2:80 -forward ss://method:pass@1.1.1.1:8443
|
glider -listen tcptun://:80=2.2.2.2:80 -forward ss://method:pass@1.1.1.1:8443
|
||||||
-listen on :80 and forward all requests to 2.2.2.2:80 via remote ss server.
|
-listen on :80 and forward all requests to 2.2.2.2:80 via remote ss server.
|
||||||
|
|
||||||
|
4
conf.go
4
conf.go
@ -171,6 +171,10 @@ func usage() {
|
|||||||
fmt.Fprintf(os.Stderr, " vmess://uuid[:method]@host:port?alterID=num\n")
|
fmt.Fprintf(os.Stderr, " vmess://uuid[:method]@host:port?alterID=num\n")
|
||||||
fmt.Fprintf(os.Stderr, "\n")
|
fmt.Fprintf(os.Stderr, "\n")
|
||||||
|
|
||||||
|
fmt.Fprintf(os.Stderr, "Available methods for vmess:\n")
|
||||||
|
fmt.Fprintf(os.Stderr, " NONE, (will add aes-128-gcm and chacha20-poly1305 later)\n")
|
||||||
|
fmt.Fprintf(os.Stderr, "\n")
|
||||||
|
|
||||||
fmt.Fprintf(os.Stderr, "Available forward strategies:\n")
|
fmt.Fprintf(os.Stderr, "Available forward strategies:\n")
|
||||||
fmt.Fprintf(os.Stderr, " rr: Round Robin mode\n")
|
fmt.Fprintf(os.Stderr, " rr: Round Robin mode\n")
|
||||||
fmt.Fprintf(os.Stderr, " ha: High Availability mode\n")
|
fmt.Fprintf(os.Stderr, " ha: High Availability mode\n")
|
||||||
|
@ -70,7 +70,7 @@ cidr=cidr=172.16.101.0/24
|
|||||||
cidr=cidr=172.16.102.0/24
|
cidr=cidr=172.16.102.0/24
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Config iptables on your linux gateway
|
#### Configure iptables on your linux gateway
|
||||||
```bash
|
```bash
|
||||||
iptables -t nat -I PREROUTING -p tcp -m set --match-set glider dst -j REDIRECT --to-ports 1081
|
iptables -t nat -I PREROUTING -p tcp -m set --match-set glider dst -j REDIRECT --to-ports 1081
|
||||||
iptables -t nat -I OUTPUT -p tcp -m set --match-set glider dst -j REDIRECT --to-ports 1081
|
iptables -t nat -I OUTPUT -p tcp -m set --match-set glider dst -j REDIRECT --to-ports 1081
|
||||||
|
@ -188,11 +188,11 @@ func (c *Conn) DecodeRespHeader() error {
|
|||||||
return errors.New("unexpected response header")
|
return errors.New("unexpected response header")
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Dynamic port supported
|
// TODO: Dynamic port support
|
||||||
// if buf[2] != 0 {
|
if buf[2] != 0 {
|
||||||
// cmd := buf[2]
|
|
||||||
// dataLen := int32(buf[3])
|
// dataLen := int32(buf[3])
|
||||||
// }
|
return errors.New("dynamic port is not supported now")
|
||||||
|
}
|
||||||
|
|
||||||
c.connected = true
|
c.connected = true
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user