fix typos
This commit is contained in:
parent
4d5fa98857
commit
4ce6f0e15f
@ -251,9 +251,9 @@ func serve(chain *gost.Chain) error {
|
|||||||
wsOpts.WriteBufferSize, _ = strconv.Atoi(node.Values.Get("wbuf"))
|
wsOpts.WriteBufferSize, _ = strconv.Atoi(node.Values.Get("wbuf"))
|
||||||
ln, err = gost.WSSListener(node.Addr, tlsCfg, wsOpts)
|
ln, err = gost.WSSListener(node.Addr, tlsCfg, wsOpts)
|
||||||
case "kcp":
|
case "kcp":
|
||||||
config, err := parseKCPConfig(node.Values.Get("c"))
|
config, er := parseKCPConfig(node.Values.Get("c"))
|
||||||
if err != nil {
|
if er != nil {
|
||||||
return err
|
return er
|
||||||
}
|
}
|
||||||
ln, err = gost.KCPListener(node.Addr, config)
|
ln, err = gost.KCPListener(node.Addr, config)
|
||||||
case "ssh":
|
case "ssh":
|
||||||
@ -314,7 +314,7 @@ func serve(chain *gost.Chain) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// By default allow for everyting
|
// By default allow for everything
|
||||||
whitelist, _ = gost.ParsePermissions("*:*:*")
|
whitelist, _ = gost.ParsePermissions("*:*:*")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ func main() {
|
|||||||
for i := 0; i < concurrency; i++ {
|
for i := 0; i < concurrency; i++ {
|
||||||
go udpEchoLoop()
|
go udpEchoLoop()
|
||||||
}
|
}
|
||||||
select{}
|
select {}
|
||||||
}
|
}
|
||||||
|
|
||||||
func udpEchoLoop() {
|
func udpEchoLoop() {
|
||||||
|
2
node.go
2
node.go
@ -22,7 +22,7 @@ type Node struct {
|
|||||||
|
|
||||||
// ParseNode parses the node info.
|
// ParseNode parses the node info.
|
||||||
// The proxy node string pattern is [scheme://][user:pass@host]:port.
|
// The proxy node string pattern is [scheme://][user:pass@host]:port.
|
||||||
// Scheme can be devided into two parts by character '+', such as: http+tls.
|
// Scheme can be divided into two parts by character '+', such as: http+tls.
|
||||||
func ParseNode(s string) (node Node, err error) {
|
func ParseNode(s string) (node Node, err error) {
|
||||||
if !strings.Contains(s, "://") {
|
if !strings.Contains(s, "://") {
|
||||||
s = "auto://" + s
|
s = "auto://" + s
|
||||||
|
@ -13,11 +13,14 @@ apps:
|
|||||||
plugs: [network, network-bind, home]
|
plugs: [network, network-bind, home]
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
|
go:
|
||||||
|
source-tag: go1.8.3
|
||||||
gost:
|
gost:
|
||||||
|
after: [go]
|
||||||
source: .
|
source: .
|
||||||
|
source-type: git
|
||||||
|
source-branch: master
|
||||||
plugin: go
|
plugin: go
|
||||||
go-packages: [github.com/ginuerzh/gost/cmd/gost]
|
go-packages: [github.com/ginuerzh/gost/cmd/gost]
|
||||||
go-importpath: github.com/ginuerzh/gost
|
go-importpath: github.com/ginuerzh/gost
|
||||||
after: [go]
|
|
||||||
go:
|
|
||||||
source-tag: go1.8.3
|
|
||||||
|
2
ss.go
2
ss.go
@ -150,7 +150,7 @@ func (h *shadowHandler) Handle(conn net.Conn) {
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
idType = 0 // address type index
|
idType = 0 // address type index
|
||||||
idIP0 = 1 // ip addres start index
|
idIP0 = 1 // ip address start index
|
||||||
idDmLen = 1 // domain address length index
|
idDmLen = 1 // domain address length index
|
||||||
idDm0 = 2 // domain address start index
|
idDm0 = 2 // domain address start index
|
||||||
|
|
||||||
|
2
ssh.go
2
ssh.go
@ -17,7 +17,7 @@ import (
|
|||||||
"golang.org/x/crypto/ssh"
|
"golang.org/x/crypto/ssh"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Applicaple SSH Request types for Port Forwarding - RFC 4254 7.X
|
// Applicable SSH Request types for Port Forwarding - RFC 4254 7.X
|
||||||
const (
|
const (
|
||||||
DirectForwardRequest = "direct-tcpip" // RFC 4254 7.2
|
DirectForwardRequest = "direct-tcpip" // RFC 4254 7.2
|
||||||
RemoteForwardRequest = "tcpip-forward" // RFC 4254 7.1
|
RemoteForwardRequest = "tcpip-forward" // RFC 4254 7.1
|
||||||
|
Loading…
Reference in New Issue
Block a user