Skip to content

CLI wgconf broken for multihop #10806

@Erik-S

Description

@Erik-S

Describe the bug
The wgconf CLI command prints a conf file for the current connection. For multihop connections, it prints out a single-hop config due to a bug.

See Mullvad docs on multihop for the correct format.

Buggy code:

if (sd->multihop()) {
Server entryServer = Server::weightChooser(sd->entryServers());
config.m_serverPort = entryServer.multihopPort();
} else {

VPN version:
2.31.0 (2.202509161519)

Affected Platforms:
All platforms with CLI.

Prerequisites:
None (other than a multihop connection)

Steps to reproduce:

  1. Set up a multihop VPN connection.
  2. Run mozillavpn wgconf ('\Mozilla VPN.exe' wgconf on Windows)

Expected result:
The Endpoint line should be:

Endpoint = <entrypoint server IP>:<exit server multihop port>

Actual result:
We get both the wrong IP and the wrong port. Note that this is a working single-hop config, so it's hard to detect.

Endpoint = <exit server IP>:<entrypoint server multihop port>

Additional notes:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions