cln-plugins/clearnet
dependabot[bot] da48ea90ca build(deps): bump urllib3 from 2.6.3 to 2.7.0 in /clearnet
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.3 to 2.7.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.6.3...2.7.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.7.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-11 22:04:18 +02:00
..
clearnet.py clearnet: migrate to uv shebang 2025-12-05 20:33:12 +01:00
pyproject.toml clearnet: upgrade min version of python to 3.10 and pyln packages to v25.9 2026-04-20 13:46:22 +02:00
README.md python plugins: add note for systemd and uv 2025-12-22 15:27:54 +01:00
test_clearnet.py format python files with ruff 2024-07-10 12:13:42 -05:00
uv.lock build(deps): bump urllib3 from 2.6.3 to 2.7.0 in /clearnet 2026-05-11 22:04:18 +02:00

clearnet enforcer plugin

This plugin aims to prefer usage over clearnet connections. It does so by disconnecing TOR connections when there are known and usable clearnet addresses.

Installation

You need uv to run this plugin like a binary. After uv is installed you can simply run

lightning-cli plugin start /path/to/clearnet.py

If you use systemd to start CLN, you must have uv in the PATH that systemd uses, which is likely different than the PATH from your shell. Most uv installation methods install uv into your user's home directory (~/.local/bin or ~/.cargo/bin), which systemd cannot access.

You can either:

Option 1: Install uv system-wide (recommended):

curl -LsSf https://astral.sh/uv/install.sh | sudo env UV_INSTALL_DIR="/usr/local/bin" sh

Option 2: Copy your existing user installation:

sudo cp "$(command -v uv)" /usr/local/bin/uv

Option 3: Configure your systemd service to use a custom PATH (see systemd documentation).

To verify uv is accessible to systemd:

sudo systemd-run --user --wait command -v uv

This should output /usr/local/bin/uv.

For general plugin installation instructions see the repos main README.md

Options

Methods

clearnet-enforce [peer_id]

Tries to enforce clearnet on all peer or on a given peer_id