Merge pull request #21 from Sagit-chu/opencode/neon-nebula

fix(gost): use chain.NewNode() to properly initialize marker for fail…
This commit is contained in:
sagit
2026-02-05 07:29:15 +08:00
committed by GitHub
3 changed files with 4 additions and 10 deletions
+1 -1
View File
@@ -195,7 +195,7 @@ func (h *forwardHandler) Handle(ctx context.Context, conn net.Conn, opts ...hand
for attempt := 0; attempt < maxRetries; attempt++ {
// Select a target node, excluding previously tried nodes
selectCtx := ctxvalue.ContextWithExcludeNodes(ctx, triedNodes)
target := &chain.Node{}
var target *chain.Node
if h.hop != nil {
target = h.hop.Select(selectCtx,
hop.ProtocolSelectOption(proto),
+1 -3
View File
@@ -225,9 +225,7 @@ func (h *forwardHandler) Handle(ctx context.Context, conn net.Conn, opts ...hand
selectCtx := ctxvalue.ContextWithExcludeNodes(ctx, triedNodes)
var target *chain.Node
if host != "" {
target = &chain.Node{
Addr: host,
}
target = chain.NewNode("", host)
}
if h.hop != nil {
target = h.hop.Select(selectCtx,
+2 -6
View File
@@ -263,9 +263,7 @@ func (h *Sniffer) dial(ctx context.Context, conn net.Conn, req *http.Request, ho
// Select a node, excluding previously tried nodes
selectCtx := ctxvalue.ContextWithExcludeNodes(ctx, triedNodes)
node = &chain.Node{
Addr: host,
}
node = chain.NewNode("", host)
if ho.Hop != nil {
node = ho.Hop.Select(selectCtx,
hop.ClientIPSelectOption(net.ParseIP(ro.ClientIP)),
@@ -903,9 +901,7 @@ func (h *Sniffer) dialTLS(ctx context.Context, host string, ho *HandleOptions) (
node = nil
if host != "" {
node = &chain.Node{
Addr: host,
}
node = chain.NewNode("", host)
}
if ho.Hop != nil {
node = ho.Hop.Select(selectCtx,