Skip to content
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

Replace obfs4proxy with Lyrebird #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL version="latest"
RUN echo '@edge https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
echo '@edge https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
apk -U upgrade && \
apk -v add tor@edge obfs4proxy@edge curl && \
apk -v add tor@edge lyrebird@edge curl && \
chmod 700 /var/lib/tor && \
rm -rf /var/cache/apk/* && \
tor --version
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ curl --socks5-hostname 127.0.0.1:9150 https://ipinfo.tw/ip
docker stop tor-socks-proxy
```

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

## IP Renewal

By default, Tor automatically changes IPs every 10 minutes. You can manually renew the IP by restarting the container:
Expand Down