Add ssh outbound
This commit is contained in:
@@ -19,6 +19,7 @@ type _Outbound struct {
|
||||
WireGuardOptions WireGuardOutboundOptions `json:"-"`
|
||||
HysteriaOptions HysteriaOutboundOptions `json:"-"`
|
||||
TorOptions TorOutboundOptions `json:"-"`
|
||||
SSHOptions SSHOutboundOptions `json:"-"`
|
||||
SelectorOptions SelectorOutboundOptions `json:"-"`
|
||||
}
|
||||
|
||||
@@ -47,6 +48,8 @@ func (h Outbound) MarshalJSON() ([]byte, error) {
|
||||
v = h.HysteriaOptions
|
||||
case C.TypeTor:
|
||||
v = h.TorOptions
|
||||
case C.TypeSSH:
|
||||
v = h.SSHOptions
|
||||
case C.TypeSelector:
|
||||
v = h.SelectorOptions
|
||||
default:
|
||||
@@ -82,6 +85,8 @@ func (h *Outbound) UnmarshalJSON(bytes []byte) error {
|
||||
v = &h.HysteriaOptions
|
||||
case C.TypeTor:
|
||||
v = &h.TorOptions
|
||||
case C.TypeSSH:
|
||||
v = &h.SSHOptions
|
||||
case C.TypeSelector:
|
||||
v = &h.SelectorOptions
|
||||
default:
|
||||
|
||||
13
option/ssh.go
Normal file
13
option/ssh.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package option
|
||||
|
||||
type SSHOutboundOptions struct {
|
||||
OutboundDialerOptions
|
||||
ServerOptions
|
||||
User string `json:"user,omitempty"`
|
||||
Password string `json:"password,omitempty"`
|
||||
PrivateKey string `json:"private_key,omitempty"`
|
||||
PrivateKeyPath string `json:"private_key_path,omitempty"`
|
||||
PrivateKeyPassphrase string `json:"private_key_passphrase,omitempty"`
|
||||
HostKeyAlgorithms Listable[string] `json:"host_key_algorithms,omitempty"`
|
||||
ClientVersion string `json:"client_version,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user