-
-
Notifications
You must be signed in to change notification settings - Fork 131
Replace obfs4proxy with Lyrebird #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe README.md file was updated to add a new section titled "Using bridges." This section provides detailed instructions for configuring the Tor client to use obfuscated bridges by editing the Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- Dockerfile (1 hunks)
- README.md (1 hunks)
🧰 Additional context used
🪛 Markdownlint
README.md
72-72: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
🔇 Additional comments (1)
Dockerfile (1)
10-10: Verify Lyrebird compatibility and performanceThe change from
obfs4proxy@edgetolyrebird@edgealigns with the PR objective. However, consider the following points:
- Ensure that Lyrebird is fully compatible with your current Tor setup and usage scenarios.
- Lyrebird is a newer pluggable transport compared to obfs4proxy. While it may offer improvements, it's also less battle-tested, which could have security implications.
- Consider documenting the reason for this change and any expected benefits in the PR description or README.
To ensure the change doesn't introduce any issues, please run the following verification steps:
This script will build the image, run a container, check if Tor and Lyrebird are running, and verify Tor connectivity.
| ### Using bridges | ||
|
|
||
| Edit `/etc/tor/torrc` and the following: | ||
|
|
||
| ``` | ||
| Bridge obfs4 ... | ||
| Bridge obfs4 ... | ||
| Bridge obfs4 ... | ||
| Bridge obfs4 ... | ||
| ClientTransportPlugin obfs4 exec /usr/bin/lyrebird | ||
| UseBridges 1 | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enhance the "Using bridges" section for clarity and completeness.
The new section on using bridges is a valuable addition to the documentation. However, consider the following improvements to make it more informative and user-friendly:
- Add a brief explanation of what bridges are and why users might want to use them.
- Provide complete example Bridge lines or explain that users need to replace the ellipsis (...) with actual bridge information.
- Mention Lyrebird explicitly, as it's part of the PR objective to replace obfs4proxy with Lyrebird.
- Consider adding a note about where users can obtain bridge information.
Here's a suggested revision:
### Using bridges
Bridges are Tor relays that aren't listed in the main Tor directory, making them harder for censors to block. To use bridges with this Tor proxy:
1. Edit `/etc/tor/torrc` and add the following:
Bridge obfs4 X.X.X.X:YYYY FINGERPRINT CERT=ZZZZ
Bridge obfs4 X.X.X.X:YYYY FINGERPRINT CERT=ZZZZ
Add more Bridge lines as needed
ClientTransportPlugin obfs4 exec /usr/bin/lyrebird
UseBridges 1
Replace X.X.X.X:YYYY, FINGERPRINT, and CERT=ZZZZ with actual bridge information.
2. Restart the Tor service to apply the changes.
Note: This configuration uses Lyrebird as the obfuscation proxy. You can obtain bridge information from https://bridges.torproject.org/ or by emailing [email protected].
Consider adding a language specifier to the fenced code block (e.g., ```plaintext) to address the Markdownlint warning.
🧰 Tools
🪛 Markdownlint
72-72: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
| ### Using bridges | ||
|
|
||
| Edit `/etc/tor/torrc` and the following: | ||
|
|
||
| ``` | ||
| Bridge obfs4 ... | ||
| Bridge obfs4 ... | ||
| Bridge obfs4 ... | ||
| Bridge obfs4 ... | ||
| ClientTransportPlugin obfs4 exec /usr/bin/lyrebird | ||
| UseBridges 1 | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider restructuring the document for better flow.
The new "Using bridges" section is well-placed at the end of the usage instructions. However, to improve the overall structure and readability of the document, consider the following suggestions:
- Add a table of contents at the beginning of the README to help users navigate the document easily.
- Group related sections under higher-level headings. For example:
- Setup and Basic Usage
- Advanced Configuration
- Using bridges
- DNS over Tor
- Maintenance
- IP Renewal
- Checking Proxy Status and Logs
This restructuring would make it easier for users to find the information they need and understand the relationship between different sections.
Here's a suggested outline for the restructured document:
# Tor-socks-proxy
[existing introduction and badges]
## Table of Contents
- [Docker Image Repository](#docker-image-repository)
- [Setup and Basic Usage](#setup-and-basic-usage)
- [First-Time Setup](#first-time-setup)
- [Start or Stop an Existing Instance](#start-or-stop-an-existing-instance)
- [Configuring a Client](#configuring-a-client)
- [Advanced Configuration](#advanced-configuration)
- [Using Bridges](#using-bridges)
- [DNS over Tor](#dns-over-tor)
- [Maintenance](#maintenance)
- [IP Renewal](#ip-renewal)
- [Checking Proxy Status and Logs](#checking-proxy-status-and-logs)
- [Support Tor Project](#support-tor-project)
[existing content, reorganized under the new headings]This structure would help users quickly find the information they need, whether they're setting up the proxy for the first time, looking for advanced configuration options, or performing maintenance tasks.
🧰 Tools
🪛 Markdownlint
72-72: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the obfs4proxy configuration with Lyrebird and updates the documentation to guide users on using bridges with Tor.
- Updated the README to add a "Using bridges" section with new configuration instructions.
- Modified the Dockerfile installation steps (not shown) to install lyrebird instead of obfs4proxy.
Files not reviewed (1)
- Dockerfile: Language not supported
| docker stop tor-socks-proxy | ||
| ``` | ||
|
|
||
| ### Using bridges |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just asking, is this obfs4proxy replacement related?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not directly. But bridges work via obfs4proxy/lyrebird. Hence the ClientTransportPlugin config below
I suppose if someone's using bridges, they already know about this. Just thought it would be nice to have
|
@c-v-ya, thanks for your contribution. Please take a look at the reviews above! |
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
68-80: Add context, clarify placeholders, and specify code block language
The Using bridges section could be more user‑friendly:
- Introduce what Tor bridges are and why users might need them.
- Point out that Lyrebird replaces obfs4proxy (with a brief install note or link).
- Clarify that the
Bridge obfs4 ...lines are placeholders to be replaced with actual IP:port, fingerprint, and CERT.- Add a language specifier (e.g., ```plaintext) to the fenced code block to satisfy MD040.
- Remind users to restart the Tor service (e.g.,
sudo systemctl restart tor) after editing/etc/tor/torrcfor changes to take effect.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
72-72: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
72-72: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
|
Bumping, since all requested changes are docs related, and some of them are fixed |
|
@PeterDaveHello Some news about merging that pull request? |
|
Let me see if I can get some spare time to review it recently! |
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Edit `/etc/tor/torrc` and add the following: | ||
|
|
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation instructs users to 'Edit /etc/tor/torrc', but this file is inside the Docker container, not on the host system. Consider clarifying how to edit this file (e.g., by mounting a custom torrc file, using docker exec, or creating a derived Dockerfile). Users unfamiliar with Docker may not understand how to access this file.
| Edit `/etc/tor/torrc` and add the following: | |
| To use bridges, you need to modify the Tor configuration file (`/etc/tor/torrc`) inside the Docker container. There are several ways to do this: | |
| **Option 1: Mount a custom `torrc` file from your host** | |
| 1. Create a custom `torrc` file on your host (e.g., `./my-torrc`) and add the following lines: | |
| ``` | |
| Bridge obfs4 ... | |
| Bridge obfs4 ... | |
| Bridge obfs4 ... | |
| Bridge obfs4 ... | |
| ClientTransportPlugin obfs4 exec /usr/bin/lyrebird | |
| UseBridges 1 | |
| ``` | |
| 2. Start the container with your custom config mounted: | |
| ```sh | |
| docker run -d --restart=always --name tor-socks-proxy -p 127.0.0.1:9150:9150/tcp -v $(pwd)/my-torrc:/etc/tor/torrc peterdavehello/tor-socks-proxy:latest | |
| ``` | |
| **Option 2: Edit the file inside a running container** | |
| 1. Start the container as usual. | |
| 2. Use `docker exec` to open a shell and edit the file: | |
| ```sh | |
| docker exec -it tor-socks-proxy vi /etc/tor/torrc | |
| ``` | |
| (You can use `nano` or `vi` depending on what's available in the container.) | |
| **Option 3: Build a custom image with your own `torrc`** | |
| 1. Create a `Dockerfile`: | |
| ```Dockerfile | |
| FROM peterdavehello/tor-socks-proxy:latest | |
| COPY my-torrc /etc/tor/torrc | |
| ``` | |
| 2. Build and run your custom image. | |
| --- | |
| Add the following lines to your `torrc` (as shown above): |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
ok i gonna wait a bit please don't take too much time :P |
|
@PeterDaveHello Some news? |
obfs4proxy was replaced with Lyrebird. Also updated the readme on how to use it
cc #34
Summary by CodeRabbit
New Features
Chores
obfs4proxywithlyrebird.