Browse Source

fix bug #66

pull/107/head
rui.zheng 10 years ago
parent
commit
15a5d74b56
  1. 3
      chain.go
  2. 3
      server.go

3
chain.go

@ -86,6 +86,9 @@ func (c *ProxyChain) Init() {
if err != nil {
glog.V(LWARNING).Infoln("[kcp]", err)
}
if config == nil {
config = DefaultKCPConfig
}
if c.nodes[0].Users != nil {
config.Crypt = c.nodes[0].Users[0].Username()
config.Key, _ = c.nodes[0].Users[0].Password()

3
server.go

@ -94,6 +94,9 @@ func (s *ProxyServer) Serve() error {
if err != nil {
glog.V(LWARNING).Infoln("[kcp]", err)
}
if config == nil {
config = DefaultKCPConfig
}
// override crypt and key if specified explicitly
if s.Node.Users != nil {
config.Crypt = s.Node.Users[0].Username()

Loading…
Cancel
Save