Compare commits
1 Commits
dev-ts-rel
...
v1.13.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a04aff02c |
@@ -5,8 +5,6 @@ icon: material/alert-decagram
|
|||||||
#### 1.13.0-alpha.35
|
#### 1.13.0-alpha.35
|
||||||
|
|
||||||
* Add pre-match support for `auto_redirect` **1**
|
* Add pre-match support for `auto_redirect` **1**
|
||||||
* Fix missing relay support for Tailscale **2**
|
|
||||||
* Fixes and improvements
|
|
||||||
|
|
||||||
**1**:
|
**1**:
|
||||||
|
|
||||||
@@ -18,10 +16,6 @@ This feature requires Linux with `auto_redirect` enabled.
|
|||||||
|
|
||||||
See [Pre-match](/configuration/shared/pre-match/) and [Rule Action](/configuration/route/rule_action/#bypass).
|
See [Pre-match](/configuration/shared/pre-match/) and [Rule Action](/configuration/route/rule_action/#bypass).
|
||||||
|
|
||||||
**2**:
|
|
||||||
|
|
||||||
See [Tailscale Endpoint](/configuration/endpoint/tailscale/#relay_server_port).
|
|
||||||
|
|
||||||
#### 1.13.0-alpha.34
|
#### 1.13.0-alpha.34
|
||||||
|
|
||||||
* Add Chrome Root Store certificate option **1**
|
* Add Chrome Root Store certificate option **1**
|
||||||
|
|||||||
@@ -2,11 +2,6 @@
|
|||||||
icon: material/new-box
|
icon: material/new-box
|
||||||
---
|
---
|
||||||
|
|
||||||
!!! quote "Changes in sing-box 1.13.0"
|
|
||||||
|
|
||||||
:material-plus: [relay_server_port](#relay_server_port)
|
|
||||||
:material-plus: [relay_server_static_endpoints](#relay_server_static_endpoints)
|
|
||||||
|
|
||||||
!!! question "Since sing-box 1.12.0"
|
!!! question "Since sing-box 1.12.0"
|
||||||
|
|
||||||
### Structure
|
### Structure
|
||||||
@@ -25,8 +20,6 @@ icon: material/new-box
|
|||||||
"exit_node_allow_lan_access": false,
|
"exit_node_allow_lan_access": false,
|
||||||
"advertise_routes": [],
|
"advertise_routes": [],
|
||||||
"advertise_exit_node": false,
|
"advertise_exit_node": false,
|
||||||
"relay_server_port": 0,
|
|
||||||
"relay_server_static_endpoints": [],
|
|
||||||
"udp_timeout": "5m",
|
"udp_timeout": "5m",
|
||||||
|
|
||||||
... // Dial Fields
|
... // Dial Fields
|
||||||
@@ -96,14 +89,6 @@ Example: `["192.168.1.1/24"]`
|
|||||||
|
|
||||||
Indicates whether the node should advertise itself as an exit node.
|
Indicates whether the node should advertise itself as an exit node.
|
||||||
|
|
||||||
#### relay_server_port
|
|
||||||
|
|
||||||
The port to listen on for incoming relay connections from other Tailscale nodes.
|
|
||||||
|
|
||||||
#### relay_server_static_endpoints
|
|
||||||
|
|
||||||
Static endpoints to advertise for the relay server.
|
|
||||||
|
|
||||||
#### udp_timeout
|
#### udp_timeout
|
||||||
|
|
||||||
UDP NAT expiration time.
|
UDP NAT expiration time.
|
||||||
|
|||||||
@@ -2,11 +2,6 @@
|
|||||||
icon: material/new-box
|
icon: material/new-box
|
||||||
---
|
---
|
||||||
|
|
||||||
!!! quote "sing-box 1.13.0 中的更改"
|
|
||||||
|
|
||||||
:material-plus: [relay_server_port](#relay_server_port)
|
|
||||||
:material-plus: [relay_server_static_endpoints](#relay_server_static_endpoints)
|
|
||||||
|
|
||||||
!!! question "自 sing-box 1.12.0 起"
|
!!! question "自 sing-box 1.12.0 起"
|
||||||
|
|
||||||
### 结构
|
### 结构
|
||||||
@@ -25,8 +20,6 @@ icon: material/new-box
|
|||||||
"exit_node_allow_lan_access": false,
|
"exit_node_allow_lan_access": false,
|
||||||
"advertise_routes": [],
|
"advertise_routes": [],
|
||||||
"advertise_exit_node": false,
|
"advertise_exit_node": false,
|
||||||
"relay_server_port": 0,
|
|
||||||
"relay_server_static_endpoints": [],
|
|
||||||
"udp_timeout": "5m",
|
"udp_timeout": "5m",
|
||||||
|
|
||||||
... // 拨号字段
|
... // 拨号字段
|
||||||
@@ -95,14 +88,6 @@ icon: material/new-box
|
|||||||
|
|
||||||
指示节点是否应将自己通告为出口节点。
|
指示节点是否应将自己通告为出口节点。
|
||||||
|
|
||||||
#### relay_server_port
|
|
||||||
|
|
||||||
监听来自其他 Tailscale 节点的中继连接的端口。
|
|
||||||
|
|
||||||
#### relay_server_static_endpoints
|
|
||||||
|
|
||||||
为中继服务器通告的静态端点。
|
|
||||||
|
|
||||||
#### udp_timeout
|
#### udp_timeout
|
||||||
|
|
||||||
UDP NAT 过期时间。
|
UDP NAT 过期时间。
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -41,7 +41,7 @@ require (
|
|||||||
github.com/sagernet/sing-tun v0.8.0-beta.11.0.20251226064455-a850c4f8a1c8
|
github.com/sagernet/sing-tun v0.8.0-beta.11.0.20251226064455-a850c4f8a1c8
|
||||||
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1
|
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1
|
||||||
github.com/sagernet/smux v1.5.34-mod.2
|
github.com/sagernet/smux v1.5.34-mod.2
|
||||||
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.4
|
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.3.0.20251225080651-3b25379a5bf8
|
||||||
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20250917110311-16510ac47288
|
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20250917110311-16510ac47288
|
||||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854
|
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854
|
||||||
github.com/spf13/cobra v1.10.2
|
github.com/spf13/cobra v1.10.2
|
||||||
|
|||||||
4
go.sum
4
go.sum
@@ -224,8 +224,8 @@ github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1 h1:aSwUNYUkV
|
|||||||
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1/go.mod h1:P11scgTxMxVVQ8dlM27yNm3Cro40mD0+gHbnqrNGDuY=
|
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1/go.mod h1:P11scgTxMxVVQ8dlM27yNm3Cro40mD0+gHbnqrNGDuY=
|
||||||
github.com/sagernet/smux v1.5.34-mod.2 h1:gkmBjIjlJ2zQKpLigOkFur5kBKdV6bNRoFu2WkltRQ4=
|
github.com/sagernet/smux v1.5.34-mod.2 h1:gkmBjIjlJ2zQKpLigOkFur5kBKdV6bNRoFu2WkltRQ4=
|
||||||
github.com/sagernet/smux v1.5.34-mod.2/go.mod h1:0KW0+R+ycvA2INW4gbsd7BNyg+HEfLIAxa5N02/28Zc=
|
github.com/sagernet/smux v1.5.34-mod.2/go.mod h1:0KW0+R+ycvA2INW4gbsd7BNyg+HEfLIAxa5N02/28Zc=
|
||||||
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.4 h1:p+9JllOL5Q2pj6bmP9gu+LdjyRg/XxHLTpMfuhuQsY4=
|
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.3.0.20251225080651-3b25379a5bf8 h1:+rb3fIFwFxhCkIt8B/V3bXWZmiNwDWBd22jQMxqY92w=
|
||||||
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.4/go.mod h1:HZxL3asFIkcIJtHdnqsdcXsY6d+1iMtq0SPUlX17TGM=
|
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.3.0.20251225080651-3b25379a5bf8/go.mod h1:HZxL3asFIkcIJtHdnqsdcXsY6d+1iMtq0SPUlX17TGM=
|
||||||
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20250917110311-16510ac47288 h1:E2tZFeg9mGYGQ7E7BbxMv1cU35HxwgRm6tPKI2Pp7DA=
|
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20250917110311-16510ac47288 h1:E2tZFeg9mGYGQ7E7BbxMv1cU35HxwgRm6tPKI2Pp7DA=
|
||||||
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20250917110311-16510ac47288/go.mod h1:WUxgxUDZoCF2sxVmW+STSxatP02Qn3FcafTiI2BLtE0=
|
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20250917110311-16510ac47288/go.mod h1:WUxgxUDZoCF2sxVmW+STSxatP02Qn3FcafTiI2BLtE0=
|
||||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 h1:6uUiZcDRnZSAegryaUGwPC/Fj13JSHwiTftrXhMmYOc=
|
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 h1:6uUiZcDRnZSAegryaUGwPC/Fj13JSHwiTftrXhMmYOc=
|
||||||
|
|||||||
@@ -12,19 +12,17 @@ import (
|
|||||||
|
|
||||||
type TailscaleEndpointOptions struct {
|
type TailscaleEndpointOptions struct {
|
||||||
DialerOptions
|
DialerOptions
|
||||||
StateDirectory string `json:"state_directory,omitempty"`
|
StateDirectory string `json:"state_directory,omitempty"`
|
||||||
AuthKey string `json:"auth_key,omitempty"`
|
AuthKey string `json:"auth_key,omitempty"`
|
||||||
ControlURL string `json:"control_url,omitempty"`
|
ControlURL string `json:"control_url,omitempty"`
|
||||||
Ephemeral bool `json:"ephemeral,omitempty"`
|
Ephemeral bool `json:"ephemeral,omitempty"`
|
||||||
Hostname string `json:"hostname,omitempty"`
|
Hostname string `json:"hostname,omitempty"`
|
||||||
AcceptRoutes bool `json:"accept_routes,omitempty"`
|
AcceptRoutes bool `json:"accept_routes,omitempty"`
|
||||||
ExitNode string `json:"exit_node,omitempty"`
|
ExitNode string `json:"exit_node,omitempty"`
|
||||||
ExitNodeAllowLANAccess bool `json:"exit_node_allow_lan_access,omitempty"`
|
ExitNodeAllowLANAccess bool `json:"exit_node_allow_lan_access,omitempty"`
|
||||||
AdvertiseRoutes []netip.Prefix `json:"advertise_routes,omitempty"`
|
AdvertiseRoutes []netip.Prefix `json:"advertise_routes,omitempty"`
|
||||||
AdvertiseExitNode bool `json:"advertise_exit_node,omitempty"`
|
AdvertiseExitNode bool `json:"advertise_exit_node,omitempty"`
|
||||||
RelayServerPort *uint16 `json:"relay_server_port,omitempty"`
|
UDPTimeout UDPTimeoutCompat `json:"udp_timeout,omitempty"`
|
||||||
RelayServerStaticEndpoints []netip.AddrPort `json:"relay_server_static_endpoints,omitempty"`
|
|
||||||
UDPTimeout UDPTimeoutCompat `json:"udp_timeout,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type TailscaleDNSServerOptions struct {
|
type TailscaleDNSServerOptions struct {
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ import (
|
|||||||
"github.com/sagernet/sing/common/ntp"
|
"github.com/sagernet/sing/common/ntp"
|
||||||
"github.com/sagernet/sing/service"
|
"github.com/sagernet/sing/service"
|
||||||
"github.com/sagernet/sing/service/filemanager"
|
"github.com/sagernet/sing/service/filemanager"
|
||||||
_ "github.com/sagernet/tailscale/feature/relayserver"
|
|
||||||
"github.com/sagernet/tailscale/ipn"
|
"github.com/sagernet/tailscale/ipn"
|
||||||
tsDNS "github.com/sagernet/tailscale/net/dns"
|
tsDNS "github.com/sagernet/tailscale/net/dns"
|
||||||
"github.com/sagernet/tailscale/net/netmon"
|
"github.com/sagernet/tailscale/net/netmon"
|
||||||
@@ -92,13 +91,11 @@ type Endpoint struct {
|
|||||||
routeDomains common.TypedValue[map[string]bool]
|
routeDomains common.TypedValue[map[string]bool]
|
||||||
routePrefixes atomic.Pointer[netipx.IPSet]
|
routePrefixes atomic.Pointer[netipx.IPSet]
|
||||||
|
|
||||||
acceptRoutes bool
|
acceptRoutes bool
|
||||||
exitNode string
|
exitNode string
|
||||||
exitNodeAllowLANAccess bool
|
exitNodeAllowLANAccess bool
|
||||||
advertiseRoutes []netip.Prefix
|
advertiseRoutes []netip.Prefix
|
||||||
advertiseExitNode bool
|
advertiseExitNode bool
|
||||||
relayServerPort *uint16
|
|
||||||
relayServerStaticEndpoints []netip.AddrPort
|
|
||||||
|
|
||||||
udpTimeout time.Duration
|
udpTimeout time.Duration
|
||||||
}
|
}
|
||||||
@@ -186,22 +183,20 @@ func NewEndpoint(ctx context.Context, router adapter.Router, logger log.ContextL
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
return &Endpoint{
|
return &Endpoint{
|
||||||
Adapter: endpoint.NewAdapter(C.TypeTailscale, tag, []string{N.NetworkTCP, N.NetworkUDP, N.NetworkICMP}, nil),
|
Adapter: endpoint.NewAdapter(C.TypeTailscale, tag, []string{N.NetworkTCP, N.NetworkUDP, N.NetworkICMP}, nil),
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
router: router,
|
router: router,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
dnsRouter: dnsRouter,
|
dnsRouter: dnsRouter,
|
||||||
network: service.FromContext[adapter.NetworkManager](ctx),
|
network: service.FromContext[adapter.NetworkManager](ctx),
|
||||||
platformInterface: service.FromContext[adapter.PlatformInterface](ctx),
|
platformInterface: service.FromContext[adapter.PlatformInterface](ctx),
|
||||||
server: server,
|
server: server,
|
||||||
acceptRoutes: options.AcceptRoutes,
|
acceptRoutes: options.AcceptRoutes,
|
||||||
exitNode: options.ExitNode,
|
exitNode: options.ExitNode,
|
||||||
exitNodeAllowLANAccess: options.ExitNodeAllowLANAccess,
|
exitNodeAllowLANAccess: options.ExitNodeAllowLANAccess,
|
||||||
advertiseRoutes: options.AdvertiseRoutes,
|
advertiseRoutes: options.AdvertiseRoutes,
|
||||||
advertiseExitNode: options.AdvertiseExitNode,
|
advertiseExitNode: options.AdvertiseExitNode,
|
||||||
relayServerPort: options.RelayServerPort,
|
udpTimeout: udpTimeout,
|
||||||
relayServerStaticEndpoints: options.RelayServerStaticEndpoints,
|
|
||||||
udpTimeout: udpTimeout,
|
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -275,14 +270,6 @@ func (t *Endpoint) Start(stage adapter.StartStage) error {
|
|||||||
if t.advertiseExitNode {
|
if t.advertiseExitNode {
|
||||||
perfs.AdvertiseRoutes = append(perfs.AdvertiseRoutes, tsaddr.ExitRoutes()...)
|
perfs.AdvertiseRoutes = append(perfs.AdvertiseRoutes, tsaddr.ExitRoutes()...)
|
||||||
}
|
}
|
||||||
if t.relayServerPort != nil {
|
|
||||||
perfs.RelayServerPort = t.relayServerPort
|
|
||||||
perfs.RelayServerPortSet = true
|
|
||||||
}
|
|
||||||
if len(t.relayServerStaticEndpoints) > 0 {
|
|
||||||
perfs.RelayServerStaticEndpoints = t.relayServerStaticEndpoints
|
|
||||||
perfs.RelayServerStaticEndpointsSet = true
|
|
||||||
}
|
|
||||||
_, err = localBackend.EditPrefs(perfs)
|
_, err = localBackend.EditPrefs(perfs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return E.Cause(err, "update prefs")
|
return E.Cause(err, "update prefs")
|
||||||
|
|||||||
Reference in New Issue
Block a user