Skip to content

Commit

Permalink
correct misspell
Browse files Browse the repository at this point in the history
  • Loading branch information
lzjluzijie committed May 21, 2018
1 parent 924943c commit 6db7169
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/shadowsocks-local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func getRequest(conn net.Conn) (rawaddr []byte, host string, err error) {
idVer = 0
idCmd = 1
idType = 3 // address type index
idIP0 = 4 // ip addres start index
idIP0 = 4 // ip address start index
idDmLen = 4 // domain address length index
idDm0 = 5 // domain address start index

Expand Down Expand Up @@ -315,7 +315,7 @@ func handleConnection(conn net.Conn) {
remote, err := createServerConn(rawaddr, addr)
if err != nil {
if len(servers.srvCipher) > 1 {
log.Println("Failed connect to all avaiable shadowsocks server")
log.Println("Failed connect to all available shadowsocks server")
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/shadowsocks-server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

const (
idType = 0 // address type index
idIP0 = 1 // ip addres start index
idIP0 = 1 // ip address start index
idDmLen = 1 // domain address length index
idDm0 = 2 // domain address start index

Expand Down
2 changes: 1 addition & 1 deletion shadowsocks/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var readTimeout time.Duration

func (config *Config) GetServerArray() []string {
// Specifying multiple servers in the "server" options is deprecated.
// But for backward compatiblity, keep this.
// But for backward compatibility, keep this.
if config.Server == nil {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion shadowsocks/pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func PipeThenCloseOta(src *Conn, dst net.Conn, addFlow func(int)) {
binary.BigEndian.PutUint32(chunkIdBytes, chunkId)
actualHmacSha1 := HmacSha1(append(src.GetIv(), chunkIdBytes...), dataBuf)
if !bytes.Equal(expectedHmacSha1, actualHmacSha1) {
Debug.Printf("conn=%p #%v read data hmac-sha1 mismatch, iv=%v chunkId=%v src=%v dst=%v len=%v expeced=%v actual=%v", src, i, src.GetIv(), chunkId, src.RemoteAddr(), dst.RemoteAddr(), dataLen, expectedHmacSha1, actualHmacSha1)
Debug.Printf("conn=%p #%v read data hmac-sha1 mismatch, iv=%v chunkId=%v src=%v dst=%v len=%v expected=%v actual=%v", src, i, src.GetIv(), chunkId, src.RemoteAddr(), dst.RemoteAddr(), dataLen, expectedHmacSha1, actualHmacSha1)
break
}
if n, err := dst.Write(dataBuf); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion shadowsocks/udprelay.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

const (
idType = 0 // address type index
idIP0 = 1 // ip addres start index
idIP0 = 1 // ip address start index
idDmLen = 1 // domain address length index
idDm0 = 2 // domain address start index

Expand Down

0 comments on commit 6db7169

Please sign in to comment.