mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-08-03 12:25:17 +03:00
Add MTProxy, MASQUE, VPN, Link parser. Update AmneziaWG. Remove Tunneling
This commit is contained in:
@@ -29,12 +29,13 @@ func NewRuleAction(ctx context.Context, logger logger.ContextLogger, action opti
|
||||
case "":
|
||||
return nil, nil
|
||||
case C.RuleActionTypeRoute:
|
||||
overrideGateway := M.ParseAddr(action.RouteOptions.OverrideGateway)
|
||||
return &RuleActionRoute{
|
||||
Outbound: action.RouteOptions.Outbound,
|
||||
RuleActionRouteOptions: RuleActionRouteOptions{
|
||||
OverrideAddress: M.ParseSocksaddrHostPort(action.RouteOptions.OverrideAddress, 0),
|
||||
OverridePort: action.RouteOptions.OverridePort,
|
||||
OverrideTunnelDestination: action.RouteOptions.OverrideTunnelDestination,
|
||||
OverrideGateway: &overrideGateway,
|
||||
NetworkStrategy: (*C.NetworkStrategy)(action.RouteOptions.NetworkStrategy),
|
||||
FallbackDelay: time.Duration(action.RouteOptions.FallbackDelay),
|
||||
UDPDisableDomainUnmapping: action.RouteOptions.UDPDisableDomainUnmapping,
|
||||
@@ -196,7 +197,7 @@ func (r *RuleActionBypass) String() string {
|
||||
type RuleActionRouteOptions struct {
|
||||
OverrideAddress M.Socksaddr
|
||||
OverridePort uint16
|
||||
OverrideTunnelDestination string
|
||||
OverrideGateway *netip.Addr
|
||||
NetworkStrategy *C.NetworkStrategy
|
||||
NetworkType []C.InterfaceType
|
||||
FallbackNetworkType []C.InterfaceType
|
||||
@@ -225,8 +226,8 @@ func (r *RuleActionRouteOptions) Descriptions() []string {
|
||||
if r.OverridePort > 0 {
|
||||
descriptions = append(descriptions, F.ToString("override-port=", r.OverridePort))
|
||||
}
|
||||
if r.OverrideTunnelDestination != "" {
|
||||
descriptions = append(descriptions, F.ToString("override-tunnel-destination=", r.OverrideTunnelDestination))
|
||||
if r.OverrideGateway != nil {
|
||||
descriptions = append(descriptions, F.ToString("override-gateway=", r.OverrideGateway.String()))
|
||||
}
|
||||
if r.NetworkStrategy != nil {
|
||||
descriptions = append(descriptions, F.ToString("network-strategy=", r.NetworkStrategy))
|
||||
|
||||
Reference in New Issue
Block a user