Skip to content

Extract default proxy ports as named constants in config.go #433

@hanneshapke

Description

@hanneshapke

src/backend/config/config.go hardcodes the default proxy ports inline:

  • Line 245: `ProxyPort: ":8080"` (forward proxy)
  • Line 264: `ProxyPort: ":8081"` (transparent proxy)

These values are also referenced in README.md, docs/, and the frontend, so a magic literal in the config struct is easy to drift from documentation.

What to do

  1. Add named constants near the top of config.go, e.g.:
    ```go
    const (
    DefaultForwardProxyPort = ":8080"
    DefaultTransparentProxyPort = ":8081"
    )
    ```
  2. Use them in the default-config constructor instead of the inline literals.
  3. (Optional) Reference the constants from any other place that hardcodes :8080 / :8081 in the Go code.

Hints

  • Run grep -rn '8080\\|8081' src/backend to find other occurrences.
  • Run make check to confirm no lint regressions.
  • Don't touch docs/README in this issue — keep the change minimal.

Difficulty: good first issue, ~30 min.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions