feat: add ssh outbound (#1087)

* feat: add ssh outbound

* fix: Modify the way to get dstAddr

---------

Co-authored-by: trevid <trevidmy@gmail.com>
This commit is contained in:
TreviD
2024-03-08 17:38:27 +08:00
committed by H1JK
parent 37b02b18f7
commit 0bb5568de9
3 changed files with 108 additions and 1 deletions

View File

@@ -134,6 +134,13 @@ func ParseProxy(mapping map[string]any) (C.Proxy, error) {
break
}
proxy = outbound.NewRejectWithOption(*rejectOption)
case "ssh":
sshOption := &outbound.SshOption{}
err = decoder.Decode(mapping, sshOption)
if err != nil {
break
}
proxy, err = outbound.NewSsh(*sshOption)
default:
return nil, fmt.Errorf("unsupport proxy type: %s", proxyType)
}