mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-12-02 10:06:47 +00:00
17 lines
554 B
Go
17 lines
554 B
Go
package outbound
|
|
|
|
import "github.com/metacubex/mihomo/transport/restls"
|
|
|
|
type RestlsOptions struct {
|
|
Password string `proxy:"password,omitempty"`
|
|
VersionHint string `proxy:"version-hint,omitempty"`
|
|
RestlsScript string `proxy:"restls-script,omitempty"`
|
|
}
|
|
|
|
func (o RestlsOptions) Parse(serverName, clientFingerprint string) (*restls.Config, error) {
|
|
if o.Password == "" && o.VersionHint == "" && o.RestlsScript == "" {
|
|
return nil, nil
|
|
}
|
|
return restls.NewRestlsConfig(serverName, o.Password, o.VersionHint, o.RestlsScript, clientFingerprint)
|
|
}
|