Skip to content

Conversation

@c-v-ya
Copy link

@c-v-ya c-v-ya commented Oct 15, 2024

obfs4proxy was replaced with Lyrebird. Also updated the readme on how to use it

cc #34

Summary by CodeRabbit

  • New Features

    • Introduced a new section in the README for configuring Tor to use bridges, including detailed instructions.
  • Chores

    • Updated package installation in the Dockerfile to replace obfs4proxy with lyrebird.

@coderabbitai
Copy link

coderabbitai bot commented Oct 15, 2024

📝 Walkthrough

Walkthrough

The 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 /etc/tor/torrc file. The instructions include adding multiple Bridge obfs4 ... lines, specifying the ClientTransportPlugin with the obfs4 transport and the executable /usr/bin/lyrebird, and enabling bridges with UseBridges 1. No changes were made to exported or public entities.

Changes

File Change Summary
README.md Added a "Using bridges" section with instructions for configuring Tor to use obfs4 bridges via lyrebird in /etc/tor/torrc.

Poem

In the land of code where rabbits hop,
A change was made, and we won't stop!
With lyrebird now in our Docker's embrace,
Bridges to Tor, we'll find our place.
Hopping through config, with joy we sing,
New paths to explore, oh what joy they bring! 🐇✨


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Files that changed from the base of the PR and between f361334 and 1bc49b0.

📒 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 performance

The change from obfs4proxy@edge to lyrebird@edge aligns with the PR objective. However, consider the following points:

  1. Ensure that Lyrebird is fully compatible with your current Tor setup and usage scenarios.
  2. 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.
  3. 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.

Comment on lines 68 to 80
### 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
```
Copy link

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:

  1. Add a brief explanation of what bridges are and why users might want to use them.
  2. Provide complete example Bridge lines or explain that users need to replace the ellipsis (...) with actual bridge information.
  3. Mention Lyrebird explicitly, as it's part of the PR objective to replace obfs4proxy with Lyrebird.
  4. 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)

Comment on lines 68 to 81
### 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
```

Copy link

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:

  1. Add a table of contents at the beginning of the README to help users navigate the document easily.
  2. 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)

@PeterDaveHello PeterDaveHello requested a review from Copilot April 20, 2025 18:20
Copy link

Copilot AI left a 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
Copy link
Owner

@PeterDaveHello PeterDaveHello Apr 20, 2025

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?

Copy link
Author

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

@PeterDaveHello
Copy link
Owner

@c-v-ya, thanks for your contribution. Please take a look at the reviews above!

Co-authored-by: Copilot <[email protected]>
Copy link

@coderabbitai coderabbitai bot left a 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:

  1. Introduce what Tor bridges are and why users might need them.
  2. Point out that Lyrebird replaces obfs4proxy (with a brief install note or link).
  3. Clarify that the Bridge obfs4 ... lines are placeholders to be replaced with actual IP:port, fingerprint, and CERT.
  4. Add a language specifier (e.g., ```plaintext) to the fenced code block to satisfy MD040.
  5. Remind users to restart the Tor service (e.g., sudo systemctl restart tor) after editing /etc/tor/torrc for 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1bc49b0 and ec2c86c.

📒 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)

@NoPlagiarism
Copy link

Bumping, since all requested changes are docs related, and some of them are fixed

@NextWork123
Copy link

@PeterDaveHello Some news about merging that pull request?

@PeterDaveHello
Copy link
Owner

Let me see if I can get some spare time to review it recently!

@PeterDaveHello
Copy link
Owner

@codex review

Copy link

Copilot AI left a 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.

Comment on lines +70 to +71
Edit `/etc/tor/torrc` and add the following:

Copy link

Copilot AI Nov 19, 2025

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.

Suggested change
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):

Copilot uses AI. Check for mistakes.
@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@NextWork123
Copy link

Let me see if I can get some spare time to review it recently!

ok i gonna wait a bit please don't take too much time :P

@NextWork123
Copy link

@PeterDaveHello Some news?

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.

4 participants