コード例 #1
0
func init() {
	internal.MustRegisterInboundConnectionHandlerCreator("dokodemo-door",
		func(space app.Space, rawConfig interface{}) (proxy.InboundConnectionHandler, error) {
			config := rawConfig.(*Config)
			return NewDokodemoDoor(space, config), nil
		})
}
コード例 #2
0
ファイル: inbound.go プロジェクト: ducktsmt/v2ray-core
func init() {
	internal.MustRegisterInboundConnectionHandlerCreator("vmess",
		func(space app.Space, rawConfig interface{}) (proxy.InboundConnectionHandler, error) {
			config := rawConfig.(*Config)

			allowedClients := protocol.NewTimedUserSet()
			for _, user := range config.AllowedUsers {
				allowedClients.AddUser(user)
			}

			return NewVMessInboundHandler(space, allowedClients), nil
		})
}
コード例 #3
0
ファイル: socksfactory.go プロジェクト: ducktsmt/v2ray-core
func init() {
	internal.MustRegisterInboundConnectionHandlerCreator("socks",
		func(space app.Space, rawConfig interface{}) (proxy.InboundConnectionHandler, error) {
			return NewSocksServer(space, rawConfig.(*Config)), nil
		})
}