func init() {
	internal.MustRegisterInboundConnectionHandlerCreator("dokodemo-door",
		func(space app.Space, rawConfig interface{}) (proxy.InboundConnectionHandler, error) {
			config := rawConfig.(*Config)
			return NewDokodemoDoor(space, config), nil
		})
}
Exemple #2
0
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
		})
}
Exemple #3
0
func init() {
	internal.MustRegisterInboundConnectionHandlerCreator("socks",
		func(space app.Space, rawConfig interface{}) (proxy.InboundConnectionHandler, error) {
			return NewSocksServer(space, rawConfig.(*Config)), nil
		})
}