fix bug #66
This commit is contained in:
parent
af61c2c92c
commit
15a5d74b56
3
chain.go
3
chain.go
@ -86,6 +86,9 @@ func (c *ProxyChain) Init() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(LWARNING).Infoln("[kcp]", err)
|
glog.V(LWARNING).Infoln("[kcp]", err)
|
||||||
}
|
}
|
||||||
|
if config == nil {
|
||||||
|
config = DefaultKCPConfig
|
||||||
|
}
|
||||||
if c.nodes[0].Users != nil {
|
if c.nodes[0].Users != nil {
|
||||||
config.Crypt = c.nodes[0].Users[0].Username()
|
config.Crypt = c.nodes[0].Users[0].Username()
|
||||||
config.Key, _ = c.nodes[0].Users[0].Password()
|
config.Key, _ = c.nodes[0].Users[0].Password()
|
||||||
|
@ -94,6 +94,9 @@ func (s *ProxyServer) Serve() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(LWARNING).Infoln("[kcp]", err)
|
glog.V(LWARNING).Infoln("[kcp]", err)
|
||||||
}
|
}
|
||||||
|
if config == nil {
|
||||||
|
config = DefaultKCPConfig
|
||||||
|
}
|
||||||
// override crypt and key if specified explicitly
|
// override crypt and key if specified explicitly
|
||||||
if s.Node.Users != nil {
|
if s.Node.Users != nil {
|
||||||
config.Crypt = s.Node.Users[0].Username()
|
config.Crypt = s.Node.Users[0].Username()
|
||||||
|
Loading…
Reference in New Issue
Block a user