feat: upgrade core to v0.4.0, pass network to admission, add dial options

Upgrade github.com/go-gost/core from v0.3.3 to v0.4.0, adapting to
interface changes:
- Admit(ctx, network, addr, opts) now accepts a network parameter
- Router.Dial now accepts variadic chain.DialOption, forwarded to
  the route's Dial call along with router-level options
- gRPC/HTTP admission plugins include the new Network field

Also fix two typos: ResoloverNodeOption -> ResolverNodeOption,
WithHostOpton -> WithHostOption.
This commit is contained in:
ginuerzh
2026-05-21 21:26:49 +08:00
parent ef58909fb7
commit 238a0b95b7
13 changed files with 33 additions and 26 deletions
+2 -2
View File
@@ -140,7 +140,7 @@ func (p *chainHop) Select(ctx context.Context, opts ...hop.SelectOption) *chain.
// hop level bypass
if p.options.bypass != nil &&
p.options.bypass.Contains(ctx, options.Network, options.Addr, bypass.WithHostOpton(options.Host)) {
p.options.bypass.Contains(ctx, options.Network, options.Addr, bypass.WithHostOption(options.Host)) {
return nil
}
@@ -151,7 +151,7 @@ func (p *chainHop) Select(ctx context.Context, opts ...hop.SelectOption) *chain.
}
// node level bypass
if node.Options().Bypass != nil &&
node.Options().Bypass.Contains(ctx, options.Network, options.Addr, bypass.WithHostOpton(options.Host)) {
node.Options().Bypass.Contains(ctx, options.Network, options.Addr, bypass.WithHostOption(options.Host)) {
continue
}