mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
ci: use go1.16rc1
This commit is contained in:
1 parent
068281cafa
commit
40aadf3e24
14 files changed
+99
-71
No files matched your search
+2
-2
@@ -1,7 +1,7 @@
|
||||
package ss
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -57,7 +57,7 @@ func (s *SS) Serve(c net.Conn) {
|
||||
tgt, err := socks.ReadAddr(sc)
|
||||
if err != nil {
|
||||
log.F("[ss] failed to get target address: %v", err)
|
||||
proxy.Copy(ioutil.Discard, c) // https://github.com/nadoo/glider/issues/180
|
||||
proxy.Copy(io.Discard, c) // https://github.com/nadoo/glider/issues/180
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package ssh
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/url"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/ssh"
|
||||
@@ -104,7 +104,7 @@ func (s *SSH) DialUDP(network, addr string) (pc net.PacketConn, writeTo net.Addr
|
||||
}
|
||||
|
||||
func privateKeyAuth(file string) (ssh.AuthMethod, error) {
|
||||
buffer, err := ioutil.ReadFile(file)
|
||||
buffer, err := os.ReadFile(file)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
|
||||
"github.com/nadoo/glider/log"
|
||||
@@ -99,7 +98,7 @@ func (c *ClientConn) Read(b []byte) (n int, err error) {
|
||||
}
|
||||
|
||||
if addLen := int64(buf[1]); addLen > 0 {
|
||||
proxy.CopyN(ioutil.Discard, c.Conn, addLen)
|
||||
proxy.CopyN(io.Discard, c.Conn, addLen)
|
||||
}
|
||||
c.rcved = true
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
@@ -134,7 +133,7 @@ func (s *VLess) readHeader(r io.Reader) (CmdType, string, error) {
|
||||
|
||||
// ignore addons
|
||||
if addonLen := int64(buf[17]); addonLen > 0 {
|
||||
proxy.CopyN(ioutil.Discard, r, addonLen)
|
||||
proxy.CopyN(io.Discard, r, addonLen)
|
||||
}
|
||||
|
||||
// cmd
|
||||
|
||||
Reference in new issue
Block a user