mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
doc: update some descriptions
This commit is contained in:
parent
49021f167c
commit
21923af1cd
@ -156,7 +156,7 @@ Available securities for vmess:
|
|||||||
TLS scheme:
|
TLS scheme:
|
||||||
tls://host:port[?skipVerify=true]
|
tls://host:port[?skipVerify=true]
|
||||||
|
|
||||||
TLS with a specified proxy protocol:
|
TLS with a specified proxy protocol(proxy over tls):
|
||||||
tls://host:port[?skipVerify=true],scheme://
|
tls://host:port[?skipVerify=true],scheme://
|
||||||
tls://host:port[?skipVerify=true],http://[user:pass@]
|
tls://host:port[?skipVerify=true],http://[user:pass@]
|
||||||
tls://host:port[?skipVerify=true],socks5://[user:pass@]
|
tls://host:port[?skipVerify=true],socks5://[user:pass@]
|
||||||
@ -165,13 +165,13 @@ TLS with a specified proxy protocol:
|
|||||||
Websocket scheme:
|
Websocket scheme:
|
||||||
ws://host:port[/path]
|
ws://host:port[/path]
|
||||||
|
|
||||||
Websocket with a specified proxy protocol:
|
Websocket with a specified proxy protocol(proxy over websocket):
|
||||||
ws://host:port[/path],scheme://
|
ws://host:port[/path],scheme://
|
||||||
ws://host:port[/path],http://[user:pass@]
|
ws://host:port[/path],http://[user:pass@]
|
||||||
ws://host:port[/path],socks5://[user:pass@]
|
ws://host:port[/path],socks5://[user:pass@]
|
||||||
ws://host:port[/path],vmess://[security:]uuid@?alterID=num
|
ws://host:port[/path],vmess://[security:]uuid@?alterID=num
|
||||||
|
|
||||||
TLS and Websocket with a specified proxy protocol:
|
TLS and Websocket with a specified proxy protocol(proxy over websocket over tls):
|
||||||
tls://host:port[?skipVerify=true],ws://[@/path],scheme://
|
tls://host:port[?skipVerify=true],ws://[@/path],scheme://
|
||||||
tls://host:port[?skipVerify=true],ws://[@/path],http://[user:pass@]
|
tls://host:port[?skipVerify=true],ws://[@/path],http://[user:pass@]
|
||||||
tls://host:port[?skipVerify=true],ws://[@/path],socks5://[user:pass@]
|
tls://host:port[?skipVerify=true],ws://[@/path],socks5://[user:pass@]
|
||||||
|
@ -66,7 +66,7 @@ listen=socks5://:1080
|
|||||||
# Forwarders, we can setup multiple forwarders.
|
# Forwarders, we can setup multiple forwarders.
|
||||||
|
|
||||||
# Socks5 proxy as forwarder
|
# Socks5 proxy as forwarder
|
||||||
#forward=socks5://192.168.1.10:1080
|
# forward=socks5://192.168.1.10:1080
|
||||||
|
|
||||||
# SS proxy as forwarder
|
# SS proxy as forwarder
|
||||||
# forward=ss://method:pass@1.1.1.1:8443
|
# forward=ss://method:pass@1.1.1.1:8443
|
||||||
@ -77,18 +77,21 @@ listen=socks5://:1080
|
|||||||
# http proxy as forwarder
|
# http proxy as forwarder
|
||||||
# forward=http://1.1.1.1:8080
|
# forward=http://1.1.1.1:8080
|
||||||
|
|
||||||
# vmess proxy as forwarder
|
# vmess with none security
|
||||||
# forward=vmess://security:5a146038-0b56-4e95-b1dc-5c6f5a32cd98@1.1.1.1:443?alterID=2
|
# forward=vmess://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@1.1.1.1:443?alterID=2
|
||||||
|
|
||||||
# vmess proxy with tls as forwarder
|
# vmess with aes-128-gcm security
|
||||||
# forward=tls://1.1.1.1:443,vmess://security:5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
|
# forward=vmess://aes-128-gcm:5a146038-0b56-4e95-b1dc-5c6f5a32cd98@1.1.1.1:443?alterID=2
|
||||||
|
|
||||||
# vmess proxy with ws as forwarder
|
# vmess over tls
|
||||||
# forward=ws://1.1.1.1:80,vmess://security:5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
|
# forward=tls://1.1.1.1:443,vmess://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
|
||||||
|
|
||||||
# vmess proxy with ws and tls as forwarder
|
# vmess over websocket
|
||||||
# forward=tls://1.1.1.1:443,ws://,vmess://security:5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
|
# forward=ws://1.1.1.1:80/path,vmess://chacha20-poly1305:5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
|
||||||
# forward=tls://1.1.1.1:443,ws://@path,vmess://security:5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
|
|
||||||
|
# vmess over ws over tls
|
||||||
|
# forward=tls://1.1.1.1:443,ws://,vmess://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
|
||||||
|
# forward=tls://1.1.1.1:443,ws://@/path,vmess://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
|
||||||
|
|
||||||
# FORWARDER CHAIN
|
# FORWARDER CHAIN
|
||||||
# ---------------
|
# ---------------
|
||||||
|
@ -81,9 +81,9 @@ func (r *chunkedReader) Read(b []byte) (int, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
r.leftBytes = int(binary.BigEndian.Uint16(r.buf[:lenSize]))
|
||||||
|
|
||||||
// if length == 0, then this is the end
|
// if length == 0, then this is the end
|
||||||
r.leftBytes = int(binary.BigEndian.Uint16(r.buf[:lenSize]))
|
|
||||||
if r.leftBytes == 0 {
|
if r.leftBytes == 0 {
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ func (c *Conn) Read(b []byte) (n int, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// parseFirstLine parses "GET /foo HTTP/1.1" OR "HTTP/1.1 200 OK" into its three parts.
|
// parseFirstLine parses "GET /foo HTTP/1.1" OR "HTTP/1.1 200 OK" into its three parts.
|
||||||
// TODO: move to seperate http lib package for reuse(also for http proxy module)
|
// TODO: move to separate http lib package for reuse(also for http proxy module)
|
||||||
func parseFirstLine(tp *textproto.Reader) (r1, r2, r3 string, ok bool) {
|
func parseFirstLine(tp *textproto.Reader) (r1, r2, r3 string, ok bool) {
|
||||||
line, err := tp.ReadLine()
|
line, err := tp.ReadLine()
|
||||||
// log.F("first line: %s", line)
|
// log.F("first line: %s", line)
|
||||||
|
@ -33,13 +33,10 @@ const (
|
|||||||
defaultFrameSize = 4096
|
defaultFrameSize = 4096
|
||||||
maxFrameHeaderSize = 2 + 8 + 4 // Fixed header + length + mask
|
maxFrameHeaderSize = 2 + 8 + 4 // Fixed header + length + mask
|
||||||
maskKeyLen = 4
|
maskKeyLen = 4
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
finalBit byte = 1 << 7
|
finalBit byte = 1 << 7
|
||||||
maskBit byte = 1 << 7
|
maskBit byte = 1 << 7
|
||||||
opCodeBinary byte = 2
|
opCodeBinary byte = 2
|
||||||
opClose byte = 8
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type frameWriter struct {
|
type frameWriter struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user