github.com/ipfans/trojan-go@v0.11.0/tunnel/transport/config.go (about)

     1  package transport
     2  
     3  import (
     4  	"github.com/ipfans/trojan-go/config"
     5  )
     6  
     7  type Config struct {
     8  	LocalHost       string                `json:"local_addr" yaml:"local-addr"`
     9  	LocalPort       int                   `json:"local_port" yaml:"local-port"`
    10  	RemoteHost      string                `json:"remote_addr" yaml:"remote-addr"`
    11  	RemotePort      int                   `json:"remote_port" yaml:"remote-port"`
    12  	TransportPlugin TransportPluginConfig `json:"transport_plugin" yaml:"transport-plugin"`
    13  }
    14  
    15  type TransportPluginConfig struct {
    16  	Enabled bool     `json:"enabled" yaml:"enabled"`
    17  	Type    string   `json:"type" yaml:"type"`
    18  	Command string   `json:"command" yaml:"command"`
    19  	Option  string   `json:"option" yaml:"option"`
    20  	Arg     []string `json:"arg" yaml:"arg"`
    21  	Env     []string `json:"env" yaml:"env"`
    22  }
    23  
    24  func init() {
    25  	config.RegisterConfigCreator(Name, func() interface{} {
    26  		return new(Config)
    27  	})
    28  }