diff --git a/proxy/dokodemo/dokodemo_test.go b/proxy/dokodemo/dokodemo_test.go index baae4401f..c227e2fa5 100644 --- a/proxy/dokodemo/dokodemo_test.go +++ b/proxy/dokodemo/dokodemo_test.go @@ -9,7 +9,7 @@ import ( "github.com/v2ray/v2ray-core/proxy/dokodemo/config/json" _ "github.com/v2ray/v2ray-core/proxy/freedom" "github.com/v2ray/v2ray-core/shell/point" - "github.com/v2ray/v2ray-core/shell/point/config/testing/mocks" + "github.com/v2ray/v2ray-core/shell/point/testing/mocks" v2testing "github.com/v2ray/v2ray-core/testing" "github.com/v2ray/v2ray-core/testing/assert" "github.com/v2ray/v2ray-core/testing/servers/tcp" diff --git a/proxy/freedom/freedom_test.go b/proxy/freedom/freedom_test.go index 9607e50b0..9292c42e8 100644 --- a/proxy/freedom/freedom_test.go +++ b/proxy/freedom/freedom_test.go @@ -17,7 +17,7 @@ import ( "github.com/v2ray/v2ray-core/proxy/socks/config/json" proxymocks "github.com/v2ray/v2ray-core/proxy/testing/mocks" "github.com/v2ray/v2ray-core/shell/point" - "github.com/v2ray/v2ray-core/shell/point/config/testing/mocks" + "github.com/v2ray/v2ray-core/shell/point/testing/mocks" v2testing "github.com/v2ray/v2ray-core/testing" "github.com/v2ray/v2ray-core/testing/assert" "github.com/v2ray/v2ray-core/testing/servers/tcp" diff --git a/proxy/socks/socks_test.go b/proxy/socks/socks_test.go index 61c26ae32..67cec6804 100644 --- a/proxy/socks/socks_test.go +++ b/proxy/socks/socks_test.go @@ -14,7 +14,7 @@ import ( "github.com/v2ray/v2ray-core/proxy/socks/config/json" proxymocks "github.com/v2ray/v2ray-core/proxy/testing/mocks" "github.com/v2ray/v2ray-core/shell/point" - "github.com/v2ray/v2ray-core/shell/point/config/testing/mocks" + "github.com/v2ray/v2ray-core/shell/point/testing/mocks" v2testing "github.com/v2ray/v2ray-core/testing" "github.com/v2ray/v2ray-core/testing/assert" ) diff --git a/proxy/vmess/vmess_test.go b/proxy/vmess/vmess_test.go index d9c556be8..34968518d 100644 --- a/proxy/vmess/vmess_test.go +++ b/proxy/vmess/vmess_test.go @@ -11,7 +11,7 @@ import ( "github.com/v2ray/v2ray-core/proxy/vmess/config" "github.com/v2ray/v2ray-core/proxy/vmess/config/json" "github.com/v2ray/v2ray-core/shell/point" - "github.com/v2ray/v2ray-core/shell/point/config/testing/mocks" + "github.com/v2ray/v2ray-core/shell/point/testing/mocks" v2testing "github.com/v2ray/v2ray-core/testing" "github.com/v2ray/v2ray-core/testing/assert" ) diff --git a/release/server/main.go b/release/server/main.go index 52e44aa9f..e403e366c 100644 --- a/release/server/main.go +++ b/release/server/main.go @@ -12,7 +12,7 @@ import ( _ "github.com/v2ray/v2ray-core/app/router/rules/config/json" "github.com/v2ray/v2ray-core/common/log" "github.com/v2ray/v2ray-core/shell/point" - jsonconf "github.com/v2ray/v2ray-core/shell/point/config/json" + pointjson "github.com/v2ray/v2ray-core/shell/point/json" // The following are neccesary as they register handlers in their init functions. _ "github.com/v2ray/v2ray-core/proxy/blackhole" @@ -69,7 +69,7 @@ func main() { log.Error("Config file is not set.") return } - config, err := jsonconf.LoadConfig(configFile) + config, err := pointjson.LoadConfig(configFile) if err != nil { log.Error("Failed to read config file (%s): %v", configFile, err) return diff --git a/shell/point/config/config.go b/shell/point/config.go similarity index 98% rename from shell/point/config/config.go rename to shell/point/config.go index c612fc07f..ab7d8fce9 100644 --- a/shell/point/config/config.go +++ b/shell/point/config.go @@ -1,4 +1,4 @@ -package config +package point import ( "github.com/v2ray/v2ray-core/app/dns" diff --git a/shell/point/config/errors.go b/shell/point/errors.go similarity index 84% rename from shell/point/config/errors.go rename to shell/point/errors.go index e6f1057ee..b29a90fd5 100644 --- a/shell/point/config/errors.go +++ b/shell/point/errors.go @@ -1,4 +1,4 @@ -package config +package point import ( "errors" diff --git a/shell/point/inbound_detour.go b/shell/point/inbound_detour.go index f69239c61..0063f58a4 100644 --- a/shell/point/inbound_detour.go +++ b/shell/point/inbound_detour.go @@ -6,7 +6,6 @@ import ( v2net "github.com/v2ray/v2ray-core/common/net" "github.com/v2ray/v2ray-core/common/retry" "github.com/v2ray/v2ray-core/proxy/common/connhandler" - "github.com/v2ray/v2ray-core/shell/point/config" ) type InboundConnectionHandlerWithPort struct { @@ -17,7 +16,7 @@ type InboundConnectionHandlerWithPort struct { // Handler for inbound detour connections. type InboundDetourHandler struct { space *app.Space - config config.InboundDetourConfig + config InboundDetourConfig ich []*InboundConnectionHandlerWithPort } @@ -25,7 +24,7 @@ func (this *InboundDetourHandler) Initialize() error { ichFactory := connhandler.GetInboundConnectionHandlerFactory(this.config.Protocol()) if ichFactory == nil { log.Error("Unknown inbound connection handler factory %s", this.config.Protocol()) - return config.BadConfiguration + return BadConfiguration } ports := this.config.PortRange() diff --git a/shell/point/config/json/connection.go b/shell/point/json/connection.go similarity index 100% rename from shell/point/config/json/connection.go rename to shell/point/json/connection.go diff --git a/shell/point/config/json/inbound_detour.go b/shell/point/json/inbound_detour.go similarity index 100% rename from shell/point/config/json/inbound_detour.go rename to shell/point/json/inbound_detour.go diff --git a/shell/point/config/json/json.go b/shell/point/json/json.go similarity index 80% rename from shell/point/config/json/json.go rename to shell/point/json/json.go index f965ce0fe..5aa252f20 100644 --- a/shell/point/config/json/json.go +++ b/shell/point/json/json.go @@ -10,7 +10,7 @@ import ( "github.com/v2ray/v2ray-core/common/log" v2net "github.com/v2ray/v2ray-core/common/net" proxyconfig "github.com/v2ray/v2ray-core/proxy/common/config" - "github.com/v2ray/v2ray-core/shell/point/config" + "github.com/v2ray/v2ray-core/shell/point" ) // Config is the config for Point server. @@ -28,7 +28,7 @@ func (config *Config) Port() v2net.Port { return config.PortValue } -func (config *Config) LogConfig() config.LogConfig { +func (config *Config) LogConfig() point.LogConfig { if config.LogConfigValue == nil { return nil } @@ -42,30 +42,30 @@ func (this *Config) RouterConfig() routerconfig.RouterConfig { return this.RouterConfigValue } -func (config *Config) InboundConfig() config.ConnectionConfig { +func (config *Config) InboundConfig() point.ConnectionConfig { if config.InboundConfigValue == nil { return nil } return config.InboundConfigValue } -func (config *Config) OutboundConfig() config.ConnectionConfig { +func (config *Config) OutboundConfig() point.ConnectionConfig { if config.OutboundConfigValue == nil { return nil } return config.OutboundConfigValue } -func (this *Config) InboundDetours() []config.InboundDetourConfig { - detours := make([]config.InboundDetourConfig, len(this.InboundDetoursValue)) +func (this *Config) InboundDetours() []point.InboundDetourConfig { + detours := make([]point.InboundDetourConfig, len(this.InboundDetoursValue)) for idx, detour := range this.InboundDetoursValue { detours[idx] = detour } return detours } -func (this *Config) OutboundDetours() []config.OutboundDetourConfig { - detours := make([]config.OutboundDetourConfig, len(this.OutboundDetoursValue)) +func (this *Config) OutboundDetours() []point.OutboundDetourConfig { + detours := make([]point.OutboundDetourConfig, len(this.OutboundDetoursValue)) for idx, detour := range this.OutboundDetoursValue { detours[idx] = detour } diff --git a/shell/point/config/json/json_test.go b/shell/point/json/json_test.go similarity index 97% rename from shell/point/config/json/json_test.go rename to shell/point/json/json_test.go index 4b55a918b..3d04d9d35 100644 --- a/shell/point/config/json/json_test.go +++ b/shell/point/json/json_test.go @@ -8,7 +8,7 @@ import ( _ "github.com/v2ray/v2ray-core/proxy/freedom/config/json" _ "github.com/v2ray/v2ray-core/proxy/socks/config/json" _ "github.com/v2ray/v2ray-core/proxy/vmess/config/json" - "github.com/v2ray/v2ray-core/shell/point/config/json" + "github.com/v2ray/v2ray-core/shell/point/json" v2testing "github.com/v2ray/v2ray-core/testing" "github.com/v2ray/v2ray-core/testing/assert" diff --git a/shell/point/config/json/log.go b/shell/point/json/log.go similarity index 100% rename from shell/point/config/json/log.go rename to shell/point/json/log.go diff --git a/shell/point/config/json/outbound_detour.go b/shell/point/json/outbound_detour.go similarity index 100% rename from shell/point/config/json/outbound_detour.go rename to shell/point/json/outbound_detour.go diff --git a/shell/point/point.go b/shell/point/point.go index 04d1bae95..0775d4d95 100644 --- a/shell/point/point.go +++ b/shell/point/point.go @@ -11,7 +11,6 @@ import ( v2net "github.com/v2ray/v2ray-core/common/net" "github.com/v2ray/v2ray-core/common/retry" "github.com/v2ray/v2ray-core/proxy/common/connhandler" - "github.com/v2ray/v2ray-core/shell/point/config" "github.com/v2ray/v2ray-core/transport/ray" ) @@ -28,7 +27,7 @@ type Point struct { // NewPoint returns a new Point server based on given configuration. // The server is not started at this point. -func NewPoint(pConfig config.PointConfig) (*Point, error) { +func NewPoint(pConfig PointConfig) (*Point, error) { var vpoint = new(Point) vpoint.port = pConfig.Port() @@ -57,7 +56,7 @@ func NewPoint(pConfig config.PointConfig) (*Point, error) { ichFactory := connhandler.GetInboundConnectionHandlerFactory(pConfig.InboundConfig().Protocol()) if ichFactory == nil { log.Error("Unknown inbound connection handler factory %s", pConfig.InboundConfig().Protocol()) - return nil, config.BadConfiguration + return nil, BadConfiguration } ichConfig := pConfig.InboundConfig().Settings() ich, err := ichFactory.Create(vpoint.space, ichConfig) @@ -70,7 +69,7 @@ func NewPoint(pConfig config.PointConfig) (*Point, error) { ochFactory := connhandler.GetOutboundConnectionHandlerFactory(pConfig.OutboundConfig().Protocol()) if ochFactory == nil { log.Error("Unknown outbound connection handler factory %s", pConfig.OutboundConfig().Protocol()) - return nil, config.BadConfiguration + return nil, BadConfiguration } ochConfig := pConfig.OutboundConfig().Settings() och, err := ochFactory.Create(vpoint.space, ochConfig) @@ -103,7 +102,7 @@ func NewPoint(pConfig config.PointConfig) (*Point, error) { detourFactory := connhandler.GetOutboundConnectionHandlerFactory(detourConfig.Protocol()) if detourFactory == nil { log.Error("Unknown detour outbound connection handler factory %s", detourConfig.Protocol()) - return nil, config.BadConfiguration + return nil, BadConfiguration } detourHandler, err := detourFactory.Create(vpoint.space, detourConfig.Settings()) if err != nil { @@ -119,7 +118,7 @@ func NewPoint(pConfig config.PointConfig) (*Point, error) { r, err := router.CreateRouter(routerConfig.Strategy(), routerConfig.Settings()) if err != nil { log.Error("Failed to create router: %v", err) - return nil, config.BadConfiguration + return nil, BadConfiguration } vpoint.router = r } @@ -132,7 +131,7 @@ func NewPoint(pConfig config.PointConfig) (*Point, error) { func (this *Point) Start() error { if this.port <= 0 { log.Error("Invalid port %d", this.port) - return config.BadConfiguration + return BadConfiguration } err := retry.Timed(100 /* times */, 100 /* ms */).On(func() error { diff --git a/shell/point/config/testing/mocks/config.go b/shell/point/testing/mocks/config.go similarity index 81% rename from shell/point/config/testing/mocks/config.go rename to shell/point/testing/mocks/config.go index 5218fe8e3..45e95d8ac 100644 --- a/shell/point/config/testing/mocks/config.go +++ b/shell/point/testing/mocks/config.go @@ -5,7 +5,7 @@ import ( routertestingconfig "github.com/v2ray/v2ray-core/app/router/config/testing" "github.com/v2ray/v2ray-core/common/log" v2net "github.com/v2ray/v2ray-core/common/net" - "github.com/v2ray/v2ray-core/shell/point/config" + "github.com/v2ray/v2ray-core/shell/point" ) type ConnectionConfig struct { @@ -84,7 +84,7 @@ func (config *Config) Port() v2net.Port { return config.PortValue } -func (config *Config) LogConfig() config.LogConfig { +func (config *Config) LogConfig() point.LogConfig { if config.LogConfigValue == nil { return nil } @@ -98,30 +98,30 @@ func (this *Config) RouterConfig() routerconfig.RouterConfig { return this.RouterConfigValue } -func (this *Config) InboundConfig() config.ConnectionConfig { +func (this *Config) InboundConfig() point.ConnectionConfig { if this.InboundConfigValue == nil { return nil } return this.InboundConfigValue } -func (this *Config) OutboundConfig() config.ConnectionConfig { +func (this *Config) OutboundConfig() point.ConnectionConfig { if this.OutboundConfigValue == nil { return nil } return this.OutboundConfigValue } -func (this *Config) InboundDetours() []config.InboundDetourConfig { - detours := make([]config.InboundDetourConfig, len(this.InboundDetoursValue)) +func (this *Config) InboundDetours() []point.InboundDetourConfig { + detours := make([]point.InboundDetourConfig, len(this.InboundDetoursValue)) for idx, detour := range this.InboundDetoursValue { detours[idx] = detour } return detours } -func (this *Config) OutboundDetours() []config.OutboundDetourConfig { - detours := make([]config.OutboundDetourConfig, len(this.OutboundDetoursValue)) +func (this *Config) OutboundDetours() []point.OutboundDetourConfig { + detours := make([]point.OutboundDetourConfig, len(this.OutboundDetoursValue)) for idx, detour := range this.OutboundDetoursValue { detours[idx] = detour } diff --git a/testing/scenarios/access.log b/testing/scenarios/access.log index 8046b3382..94d71d38b 100644 --- a/testing/scenarios/access.log +++ b/testing/scenarios/access.log @@ -100,3 +100,309 @@ 2015/12/06 10:58:09 127.0.0.1:62026 accepted 127.0.0.1:30001 2015/12/06 10:58:09 127.0.0.1:62029 accepted 127.0.0.1:30001 2015/12/06 10:58:09 127.0.0.1:62033 accepted 127.0.0.1:30003 +2015/12/06 16:19:44 127.0.0.1:63489 accepted 127.0.0.1:50024 +2015/12/06 16:19:44 127.0.0.1:63493 accepted 127.0.0.1:30001 +2015/12/06 16:19:44 127.0.0.1:63496 accepted 127.0.0.1:30001 +2015/12/06 16:19:44 127.0.0.1:63499 accepted 127.0.0.1:30001 +2015/12/06 16:19:44 127.0.0.1:63502 accepted 127.0.0.1:30001 +2015/12/06 16:19:44 127.0.0.1:63505 accepted 127.0.0.1:30001 +2015/12/06 16:19:44 127.0.0.1:63508 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63511 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63514 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63517 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63520 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63523 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63526 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63529 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63532 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63535 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63538 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63541 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63544 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63547 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63550 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63553 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63556 accepted 127.0.0.1:30001 +2015/12/06 16:19:45 127.0.0.1:63559 accepted 127.0.0.1:30001 +2015/12/06 16:19:46 127.0.0.1:63564 accepted 127.0.0.1:30001 +2015/12/06 16:19:46 127.0.0.1:63570 accepted 127.0.0.1:30001 +2015/12/06 16:19:46 127.0.0.1:63573 accepted 127.0.0.1:30001 +2015/12/06 16:19:46 127.0.0.1:63576 accepted 127.0.0.1:30001 +2015/12/06 16:19:46 127.0.0.1:63579 accepted 127.0.0.1:30001 +2015/12/06 16:19:46 127.0.0.1:63582 accepted 127.0.0.1:30001 +2015/12/06 16:19:46 127.0.0.1:63585 accepted 127.0.0.1:30001 +2015/12/06 16:19:46 127.0.0.1:63588 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63591 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63594 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63597 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63600 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63603 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63606 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63609 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63612 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63615 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63618 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63621 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63624 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63627 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63630 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63633 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63636 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63639 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63642 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63645 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63648 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63651 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63654 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63657 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63660 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63663 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63666 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63669 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63672 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63675 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63678 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63681 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63684 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63687 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63690 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63693 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63696 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63699 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63702 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63705 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63708 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63711 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63714 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63717 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63720 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63723 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63726 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63729 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63732 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63735 accepted 127.0.0.1:30001 +2015/12/06 16:19:47 127.0.0.1:63738 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63741 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63744 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63747 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63750 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63753 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63756 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63759 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63762 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63765 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63768 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63771 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63774 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63777 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63780 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63783 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63786 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63789 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63792 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63795 accepted 127.0.0.1:30001 +2015/12/06 16:19:48 127.0.0.1:63799 accepted 127.0.0.1:30003 +2015/12/06 16:38:20 127.0.0.1:64128 accepted 127.0.0.1:50024 +2015/12/06 16:38:20 127.0.0.1:64132 accepted 127.0.0.1:30001 +2015/12/06 16:38:20 127.0.0.1:64135 accepted 127.0.0.1:30001 +2015/12/06 16:38:20 127.0.0.1:64138 accepted 127.0.0.1:30001 +2015/12/06 16:38:20 127.0.0.1:64141 accepted 127.0.0.1:30001 +2015/12/06 16:38:20 127.0.0.1:64144 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64147 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64150 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64153 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64156 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64159 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64162 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64165 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64168 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64171 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64174 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64177 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64180 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64183 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64186 accepted 127.0.0.1:30001 +2015/12/06 16:38:21 127.0.0.1:64189 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64194 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64197 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64200 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64203 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64206 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64209 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64212 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64215 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64218 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64221 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64224 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64227 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64230 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64233 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64236 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64239 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64242 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64245 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64248 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64251 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64254 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64257 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64260 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64263 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64266 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64269 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64272 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64275 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64278 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64281 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64284 accepted 127.0.0.1:30001 +2015/12/06 16:38:22 127.0.0.1:64287 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64290 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64293 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64296 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64299 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64302 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64305 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64308 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64311 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64314 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64317 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64320 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64323 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64326 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64329 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64332 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64335 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64338 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64341 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64344 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64347 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64350 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64353 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64356 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64359 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64362 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64365 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64368 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64371 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64374 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64377 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64380 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64383 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64386 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64389 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64392 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64395 accepted 127.0.0.1:30001 +2015/12/06 16:38:23 127.0.0.1:64398 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64401 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64404 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64407 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64410 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64413 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64416 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64419 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64422 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64425 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64428 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64431 accepted 127.0.0.1:30001 +2015/12/06 16:38:24 127.0.0.1:64435 accepted 127.0.0.1:30003 +2015/12/06 16:39:35 127.0.0.1:64510 accepted 127.0.0.1:50024 +2015/12/06 16:39:35 127.0.0.1:64514 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64517 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64520 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64523 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64526 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64529 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64532 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64535 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64538 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64541 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64544 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64547 accepted 127.0.0.1:30001 +2015/12/06 16:39:35 127.0.0.1:64550 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64553 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64556 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64559 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64562 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64565 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64568 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64571 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64574 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64579 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64582 accepted 127.0.0.1:30001 +2015/12/06 16:39:36 127.0.0.1:64585 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64588 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64591 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64594 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64597 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64600 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64603 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64606 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64609 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64612 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64615 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64618 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64621 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64624 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64627 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64630 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64633 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64636 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64639 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64642 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64645 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64648 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64651 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64654 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64657 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64660 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64663 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64666 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64669 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64672 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64675 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64678 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64681 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64684 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64687 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64690 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64693 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64696 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64699 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64702 accepted 127.0.0.1:30001 +2015/12/06 16:39:37 127.0.0.1:64705 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64708 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64711 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64714 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64717 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64720 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64723 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64726 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64729 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64732 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64735 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64738 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64741 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64744 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64747 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64750 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64753 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64756 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64759 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64762 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64765 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64768 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64771 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64774 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64777 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64780 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64783 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64786 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64789 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64792 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64795 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64798 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64801 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64804 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64807 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64810 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64813 accepted 127.0.0.1:30001 +2015/12/06 16:39:38 127.0.0.1:64817 accepted 127.0.0.1:30003 diff --git a/testing/scenarios/server_env.go b/testing/scenarios/server_env.go index 2d8489f42..898eb7667 100644 --- a/testing/scenarios/server_env.go +++ b/testing/scenarios/server_env.go @@ -9,7 +9,7 @@ import ( _ "github.com/v2ray/v2ray-core/app/router/rules/config/json" "github.com/v2ray/v2ray-core/common/log" "github.com/v2ray/v2ray-core/shell/point" - jsonconf "github.com/v2ray/v2ray-core/shell/point/config/json" + pointjson "github.com/v2ray/v2ray-core/shell/point/json" // The following are neccesary as they register handlers in their init functions. _ "github.com/v2ray/v2ray-core/proxy/blackhole" @@ -49,7 +49,7 @@ func InitializeServerSetOnce(testcase string) error { } func InitializeServer(configFile string) error { - config, err := jsonconf.LoadConfig(configFile) + config, err := pointjson.LoadConfig(configFile) if err != nil { log.Error("Failed to read config file (%s): %v", configFile, err) return err