Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultExpireSecond = 30
Variables ¶
View Source
var ( ErrVerifyFailed = errors.New("verify failed") ErrDecryptFailed = errors.New("decrypt failed") ErrProxyDie = errors.New("proxy die") )
View Source
var Fingerprints = map[string]*utls.ClientHelloID{ "chrome": &utls.HelloChrome_Auto, "firefox": &utls.HelloFirefox_Auto, "safari": &utls.HelloSafari_Auto, "ios": &utls.HelloIOS_Auto, "android": &utls.HelloAndroid_11_OkHttp, "edge": &utls.HelloEdge_Auto, "360": &utls.Hello360_Auto, "qq": &utls.HelloQQ_Auto, }
View Source
var Prefix = []byte("REALITY")
Functions ¶
func GetLogger ¶
func GetLogger(debug bool) logrus.FieldLogger
Types ¶
type ClientConfig ¶
type ClientConfig struct {
ServerAddr string `json:"server_addr"`
SNI string `json:"sni_name"`
SkipVerify bool `json:"skip_verify"`
PublicKeyECDH string `json:"public_key_ecdh"`
PublicKeyVerify string `json:"public_key_verify"`
FingerPrint string `json:"finger_print"`
ExpireSecond uint32 `json:"expire_second"`
Debug bool `json:"debug"`
OverlayData byte `json:"overlay_data"`
// contains filtered or unexported fields
}
func UnmarshalClientConfig ¶
func UnmarshalClientConfig(configData []byte) (*ClientConfig, error)
func (*ClientConfig) Marshal ¶
func (config *ClientConfig) Marshal() ([]byte, error)
func (*ClientConfig) Validate ¶
func (config *ClientConfig) Validate() error
type OverlayData ¶
type OverlayData interface {
OverlayData() byte
}
type ServerConfig ¶
type ServerConfig struct {
SNIAddr string `json:"sni_addr"`
ServerAddr string `json:"server_addr"`
SkipVerify bool `json:"skip_verify"`
PrivateKeyECDH string `json:"private_key_ecdh"`
PrivateKeySign string `json:"private_key_sign"`
ExpireSecond uint32 `json:"expire_second"`
Debug bool `json:"debug"`
ClientFingerPrint string `json:"finger_print,omitempty"`
// contains filtered or unexported fields
}
func NewServerConfig ¶
func NewServerConfig(sniAddr string, serverAddr string) (*ServerConfig, error)
func (*ServerConfig) SNIHost ¶
func (c *ServerConfig) SNIHost() string
func (*ServerConfig) SNIPort ¶
func (c *ServerConfig) SNIPort() string
func (*ServerConfig) ToClientConfig ¶
func (s *ServerConfig) ToClientConfig(overlayData byte) *ClientConfig
func (*ServerConfig) Validate ¶
func (c *ServerConfig) Validate() error
Directories
¶
| Path | Synopsis |
|---|---|
|
grsc
command
|
|
|
grss
command
|
|
|
grsu
command
|
|
|
example
|
|
|
testcipher
command
|
|
|
testclient
command
|
|
|
testserver
command
|
Click to show internal directories.
Click to hide internal directories.