Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug] CLI works but YAML config does not activate http2 forwarder #823

@appleliao2025

Description

@appleliao2025

I found that GOST http2 forwarding works normally when started via CLI, but fails entirely when using a YAML configuration file.

The SOCKS5 listener starts successfully, but the forwarder does NOT take effect.


✔ Environment

  • GOST version: v3.x
  • Client OS: Linux
  • Server OS: Linux (cloud provider)
  • Transport: http2
  • Auth enabled
  • Server port is reachable (verified)

✔ Working CLI command

This command works perfectly:

gost -L=:1081 -F="http2://user:[email protected]:12345"

With this running, testing via curl works:

curl --socks5-hostname 127.0.0.1:1081 https://www.google.com

❌ NOT working: YAML configuration

This YAML config parses without errors, but forwarding does not work:

services:
  - name: s5
    addr: ":1081"
    handler:
      type: socks5
    forwarder:
      nodes:
        - transport:
            type: http2
            host: server.example.com:12345
            auth:
              username: user
              password: pass
      selector:
        strategy: round-robin

Symptoms:

  • Local SOCKS5 accepts connections
  • But no outbound http2 traffic is initiated at all
  • Browser / curl fails with:
SOCKS5 connect ... Can't complete SOCKS5 connection. (3)
dial tcp xxx:443: i/o timeout

🎯 Important Observations

  • Using CLI -F=http2://... works 100%
  • YAML version does not even attempt to connect to the server
  • Server receives zero connections when using YAML
  • No validation errors, no warnings — silent failure
  • The same server & credentials work via CLI, so not a server issue

📌 Possible root cause

  • YAML forwarder configuration may require additional undocumented fields
  • YAML parsing may not be equivalent to CLI parsing
  • Forwarder is being ignored silently when loaded from YAML

✔ Expected Behavior

YAML config should behave exactly like:

-F="http2://user:[email protected]:12345"

But currently, forwarder does not activate when using config files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions