Skip to content

Conversation

@BiMaghz
Copy link

@BiMaghz BiMaghz commented Nov 27, 2025

In recent versions of xray-core , the output of x25519 -i command has changed.

  • Old Output: Public key: ...
  • New Output: Password: ...

Issue: the regex in _utils.py failed to match the new output format, causing get_x25519 to return None. This led to a crash during startup when _config.py attempted to access the key.

  • Error Log:
marznode-1  | 2025-11-22 14:33:41,210 - INFO - marznode.marznode: Generating a keypair for Marznode.
marznode-1  | Traceback (most recent call last):
...
marznode-1  |   File "/app/marznode/backends/xray/xray_backend.py", line 94, in start
marznode-1  |     self._config = XrayConfig(backend_config, api_port=xray_api_port)
marznode-1  |   File "/app/marznode/backends/xray/_config.py", line 55, in __init__
marznode-1  |     self._resolve_inbounds()
marznode-1  |   File "/app/marznode/backends/xray/_config.py", line 142, in _resolve_inbounds
marznode-1  |     settings["pbk"] = x25519["public_key"]
marznode-1  | TypeError: 'NoneType' object is not subscriptable```

fix: updated marznode/backends/xray/_utils.py: Added regex support for new Password: label while maintaining backward compatibility for older xray versions.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant