mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
ci: update to go 1.12
This commit is contained in:
1 parent
47547bb08d
commit
9bcc18a29b
7 files changed
+23
-11
No files matched your search
@@ -242,6 +242,7 @@ func (s *HTTP) Dial(network, addr string) (net.Conn, error) {
|
||||
|
||||
var buf bytes.Buffer
|
||||
buf.Write([]byte("CONNECT " + addr + " HTTP/1.1\r\n"))
|
||||
// TODO: add host header for compatibility?
|
||||
buf.Write([]byte("Proxy-Connection: Keep-Alive\r\n"))
|
||||
|
||||
if s.user != "" && s.password != "" {
|
||||
|
||||
+2
-2
@@ -127,7 +127,7 @@ func (c *TLSObfsConn) handshake(b []byte) (int, error) {
|
||||
buf := new(bytes.Buffer)
|
||||
|
||||
// prepare extension & clientHello content
|
||||
bufExt, bufHello := extention(b, c.obfsHost), clientHello()
|
||||
bufExt, bufHello := extension(b, c.obfsHost), clientHello()
|
||||
|
||||
// prepare lengths
|
||||
extLen := bufExt.Len()
|
||||
@@ -217,7 +217,7 @@ func clientHello() *bytes.Buffer {
|
||||
return buf
|
||||
}
|
||||
|
||||
func extention(b []byte, server string) *bytes.Buffer {
|
||||
func extension(b []byte, server string) *bytes.Buffer {
|
||||
buf := new(bytes.Buffer)
|
||||
|
||||
// Extension: SessionTicket TLS
|
||||
|
||||
Reference in new issue
Block a user