green-tunnel 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +122 -114
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,160 +1,168 @@
1
1
  # Green Tunnel
2
+
2
3
  <p align="center">
3
4
  <img src="assets/logo.png" alt="green tunnel logo" width="200">
4
5
  </p>
5
6
  <p align="center">
6
- <img src="https://img.shields.io/github/license/SadeghHayeri/GreenTunnel.svg?color=Green&style=for-the-badge"> <img src="https://img.shields.io/github/repo-size/SadeghHayeri/GreenTunnel.svg?color=Green&style=for-the-badge"> <img src="https://img.shields.io/discord/707464295021019197?color=Green&style=for-the-badge">
7
+ <img src="https://img.shields.io/github/license/SadeghHayeri/GreenTunnel.svg?color=Green&style=for-the-badge">
8
+ <img src="https://img.shields.io/npm/v/green-tunnel?color=Green&style=for-the-badge">
9
+ <img src="https://img.shields.io/github/repo-size/SadeghHayeri/GreenTunnel.svg?color=Green&style=for-the-badge">
7
10
  </p>
8
11
 
9
12
  GreenTunnel bypasses DPI (Deep Packet Inspection) systems found in many ISPs (Internet Service Providers) which block access to certain websites.
10
13
 
11
- <p align="center">
12
- <img src="assets/demo.gif" alt="green tunnel demo" style="margin-top: 20px;">
13
- </p>
14
+ > **Note:** GreenTunnel does not hide your IP address. It only bypasses DPI-based censorship.
14
15
 
15
- ## How to use
16
- ### Graphical user interface (GUI)
17
- You can simply choose the suitable installation for your OS in the [releases](https://github.com/SadeghHayeri/GreenTunnel/releases "releases") section.
16
+ ---
18
17
 
19
- ### Command-line interface (CLI)
20
- You can install GreenTunnel using [npm](https://www.npmjs.org/ "npm"):
21
- ```
22
- $ npm i -g green-tunnel
23
- ```
18
+ <table>
19
+ <tr>
20
+ <td width="340"><img src="assets/new-version.png" alt="GreenTunnel v2.0.0 new UI" width="320"></td>
21
+ <td valign="top" style="padding-left: 24px;">
22
+
23
+ **GreenTunnel v2 — with the help of [Claude Code](https://claude.ai/claude-code) — is out now.**
24
+
25
+ After years of silence, this project is alive again. The entire codebase has been rebuilt from the ground up: native ESM, Node.js 20+, a brand new dark UI, and a clean dependency tree with zero known vulnerabilities.
26
+
27
+ Open-source tools that help people reach the free internet shouldn't die — and with AI-assisted development, they don't have to. We'll keep doing our best to help people access the open internet, one packet at a time.
28
+
29
+ </td>
30
+ </tr>
31
+ </table>
32
+
33
+ ---
34
+
35
+ ## Installation
36
+
37
+ ### Requirements
24
38
 
25
- or using [snap](https://snapcraft.io) (edge version):
39
+ - **Node.js 20+**
40
+
41
+ ### npm (recommended)
42
+
43
+ ```bash
44
+ npm install -g green-tunnel
26
45
  ```
27
- sudo snap install --edge green-tunnel --devmode
46
+
47
+ After installation, run with `gt` or `green-tunnel`.
48
+
49
+ ### Docker
50
+
51
+ ```bash
52
+ docker run -p 8000:8000 sadeghhayeri/greentunnel
28
53
  ```
29
54
 
55
+ ---
30
56
 
31
- after installation you can run it using `gt` or `green-tunnel` commands.
57
+ ## Usage
58
+
59
+ ### CLI
32
60
 
33
61
  ```
34
- $ gt --help
35
62
  Usage: green-tunnel [options]
36
63
  Usage: gt [options]
37
64
 
38
65
  Options:
39
- --help, -h Show help [boolean]
40
- --version, -V Show version number [boolean]
41
- --ip ip address to bind proxy server[string] [default: "127.0.0.1"]
42
- --https-only Block insecure HTTP requests [boolean] [default: false]
43
- --port port address to bind proxy server [number] [default: 8000]
44
- --dns-type [string] [choices: "https", "tls"] [default: "https"]
45
- --dns-server [string] [default: "https://cloudflare-dns.com/dns-query"]
46
- --dns-ip IP address for unencrypted DNS [string][default: "127.0.0.1"]
47
- --dns-port Port for unencrypted DNS [number] [default: 53]
48
- --silent, -s run in silent mode [boolean] [default: false]
49
- --verbose, -v debug mode [string] [default: ""]
50
- --system-proxy automatic set system-proxy [boolean] [default: true]
51
-
52
- Examples:
53
- gt
54
- gt --ip 127.0.0.1 --port 8000 --https-only
55
- gt --dns-server https://doh.securedns.eu/dns-query
56
- gt --verbose 'green-tunnel:proxy*'
57
-
58
- ISSUES: https://github.com/SadeghHayeri/GreenTunnel/issues
66
+ --ip IP address to bind proxy server [string] [default: "127.0.0.1"]
67
+ --port Port to bind proxy server [number] [default: 8000]
68
+ --https-only Block insecure HTTP requests [boolean] [default: false]
69
+ --dns-type DNS resolver type [string] [choices: "https", "tls", "unencrypted"] [default: "https"]
70
+ --dns-server DNS server URL [string] [default: "https://cloudflare-dns.com/dns-query"]
71
+ --dns-ip IP for unencrypted DNS [string] [default: "127.0.0.1"]
72
+ --dns-port Port for unencrypted DNS [number] [default: 53]
73
+ --tls-record-frag... Enable TLS record fragmentation [boolean] [default: false]
74
+ --silent, -s Run in silent mode [boolean] [default: false]
75
+ --verbose, -v Debug mode (e.g. 'green-tunnel:*') [string]
76
+ --system-proxy Auto-set system proxy [boolean] [default: true]
77
+ --help, -h Show help
78
+ --version, -V Show version number
59
79
  ```
60
80
 
61
- for debug use verbose option:
62
- ```
63
- $ green-tunnel --verbose 'green-tunnel:*'
81
+ **Examples:**
82
+
83
+ ```bash
84
+ # Basic usage (auto-sets system proxy)
85
+ gt
86
+
87
+ # Custom port
88
+ gt --port 9000
89
+
90
+ # Use a different DoH server
91
+ gt --dns-server https://doh.securedns.eu/dns-query
92
+
93
+ # Enable TLS record fragmentation (for stricter DPI)
94
+ gt --tls-record-fragmentation
95
+
96
+ # Debug mode
97
+ gt --verbose 'green-tunnel:*'
64
98
  ```
65
99
 
66
100
  ### Docker
67
- ```
68
- $ docker run -p 8000:8000 sadeghhayeri/green-tunnel
69
- ```
70
- > **envs**
71
- * PORT
72
- * HTTPS-ONLY
73
- * VERBOSE
74
- * SILENT
75
- * DNS_TYPE
76
- * DNS_SERVER
77
-
78
- usage:
79
- ```
80
- $ docker run -e 'PORT=1000' -p 8000:1000 sadeghhayeri/green-tunnel
81
- ```
82
101
 
83
- #### On Raspberry Pi
84
- ```
85
- $ docker run -p 8000:8000 sadeghhayeri/green-tunnel:arm
86
- ```
102
+ ```bash
103
+ # Basic
104
+ docker run -p 8000:8000 sadeghhayeri/greentunnel
87
105
 
88
- If you want to make container keep running when reboot:
89
- ```
90
- $ docker run -d --restart unless-stopped -p 8000:8000 sadeghhayeri/green-tunnel:arm
106
+ # Custom port
107
+ docker run -e PORT=9000 -p 9000:9000 sadeghhayeri/greentunnel
108
+
109
+ # Run in background, restart on reboot
110
+ docker run -d --restart unless-stopped -p 8000:8000 sadeghhayeri/greentunnel
91
111
  ```
92
112
 
93
- Please make sure port `8000` is not blocked on Raspberry Pi firewall. (`sudo ufw allow 8000 comment Green-Tunnel`)
113
+ **Environment variables:**
94
114
 
95
- To use it on your other device, set http proxy to ```<Raspberry Pi IP Address>:<PORT>```. (PORT = `8000`)
115
+ | Variable | Description | Default |
116
+ |---|---|---|
117
+ | `PORT` | Proxy port | `8000` |
118
+ | `HTTPS_ONLY` | Block HTTP traffic | `false` |
119
+ | `DNS_TYPE` | `https`, `tls`, or `unencrypted` | `https` |
120
+ | `DNS_SERVER` | DNS server URL | Cloudflare DoH |
121
+ | `SILENT` | Suppress output | `false` |
122
+ | `VERBOSE` | Debug namespace | — |
96
123
 
97
- ### Tested on
98
- - MacOS Catalina with node 12
99
- - Ubuntu 18.04 with node 8
100
- - Windows 10 with node 8
124
+ ### Graphical Interface (GUI)
101
125
 
126
+ Download the pre-built installer for your OS from the [releases](https://github.com/SadeghHayeri/GreenTunnel/releases) page.
102
127
 
103
- ## FAQ
104
- > **How does it work?**
105
- ###### HTTP
106
- There are gaps in providers in DPI. They happen from what the DPI rules write for ordinary user programs, omitting all possible cases that are permissible by standards. This is done for simplicity and speed.
107
- Some DPIs cannot recognize the HTTP request if it is divided into TCP segments. For example, a request of the form
128
+ ---
108
129
 
109
- ```
110
- GET / HTTP/1.0`
111
- Host: www.youtube.com
112
- ...
113
- ```
114
- we send it in 2 parts: first comes `GET / HTTP/1.0 \n Host: www.you` and second sends as `tube.com \n ...`. In this example, ISP cannot find blocked word **youtube** in packets and you can bypass it!
130
+ ## How It Works
131
+
132
+ ### HTTP
133
+
134
+ Some DPI systems fail to detect blocked content when an HTTP request is split across multiple TCP segments. GreenTunnel splits the request so the `Host` header straddles a segment boundary, preventing the DPI from matching the blocked hostname.
135
+
136
+ ### HTTPS / SNI Fragmentation
137
+
138
+ TLS's Server Name Indication (SNI) extension sends the target hostname in plaintext during the handshake. DPI systems use this to block HTTPS connections. GreenTunnel splits the initial `ClientHello` TLS record into small fragments so the DPI cannot reassemble and inspect the SNI field.
139
+
140
+ Optionally, `--tls-record-fragmentation` breaks the TLS record at a lower level for stricter DPI environments.
115
141
 
116
- ###### HTTPS
117
- Server Name Indication (SNI) is an extension to TLS (Transport Layer Security) that indicates the actual destination hostname a client is attempting to access over HTTPS. For this Web Filter feature, SNI hostname information is used for blocking access to specific sites over HTTPS. For example, if the administrator chooses to block the hostname **youtube** using this feature, all Website access attempts over HTTPS that contain **youtube** like **www.youtube.com** in the SNI would be blocked. However, access to the same hostname over HTTP would not be blocked by this feature. GreenTunnel tries to split first **CLIENT-HELLO** packet into small chunks and ISPs can't parse packet and found SNI field so bypass traffic!
142
+ ### Encrypted DNS
118
143
 
119
- ###### DNS
120
- When you enter a URL in a Web browser, the first thing the Web browser does is to ask a DNS (Domain Name System) server, at a known numeric address, to look up the domain name referenced in the URL and supply the corresponding IP address.
121
- If the DNS server is configured to block access, it consults a blacklist of banned domain names. When a browser requests the IP address for one of these domain names, the DNS server gives a wrong answer or no answer at all.
122
- GreenTunnel use [DNS over HTTPS](https://en.wikipedia.org/wiki/DNS_over_HTTPS "doh (DNS over HTTPS)") and [DNS over TLS](https://en.wikipedia.org/wiki/DNS_over_TLS "DNS over TLS") to get real IP address and bypass DNS Spoofing.
144
+ Standard DNS lookups can be intercepted or spoofed by ISPs to block domains at the DNS level. GreenTunnel uses **DNS over HTTPS (DoH)** or **DNS over TLS (DoT)** to get the real IP address, bypassing DNS-based blocking.
123
145
 
124
- ## Development notes
125
- GreenTunnel is an open-source app and I really appreciate other developers adding new features and/or helping fix bugs. If you want to contribute to GreenTunnel, you can fork this repository, make the changes and create a pull request.
146
+ ---
126
147
 
127
- However, please make sure you follow a few rules listed below to ensure that your changes get merged into the main repo. The rules listed below are enforced to make sure the changes made are well-documented and can be easily kept track of.
148
+ ## Contributing
128
149
 
129
- - ⇄ Pull requests and Stars are always welcome.
130
- - For bugs and feature requests, please create an issue.
131
- - Make sure your pull request has an informative title. You should use prefixes like `ADD:`, `FIX:`, etc at the start of the title which describes the changes followed by a one-line description of the changes. Example: ADD: Added a new feature to GreenTunnel
132
- - Commits in your fork should be informative, as well. Make sure you don't combine too many changes into a single commit.
150
+ Pull requests and issues are always welcome.
133
151
 
134
- ## TODO List
135
- - [X] enable/disable proxy on windows
136
- - [ ] HTTPHandler
137
- - [X] add CLI arguments
138
- - [X] catch all exceptions
139
- - [ ] add preferences menu
140
- - [ ] fix close button
152
+ - Use `FIX:`, `ADD:`, `UPDATE:` prefixes in PR titles.
153
+ - Keep commits focused and descriptive.
154
+ - Make sure `npm install` passes and `node -e "import('./src/index.js')"` works.
155
+
156
+ ---
141
157
 
142
158
  ## Donation
143
- > Love GreenTunnel? Please consider donating to sustain our activities.
144
-
145
- **DOGECOIN!:** DTGjx8KKDCUkSEbtVHgQx1GYEnNaVVuXLa<br />
146
- **BITCOIN:** bc1qknjsmsa98lljwxjwl4pmjh48s8su8r8ajkqd8w<br />
147
- **ETHEREUM:** 0x018fbf3fAC7165b2c85f856cC90E2d9410415150<br />
148
- **LITECOIN:** ltc1q5tfprazpkzjvzf5shgprkpkhnnku3p72feutxt<br />
149
- **RIPPLE/XRP:** rt6ZTkKdBVYzBee9CpQsDTsewnTbAoV13<br />
150
-
151
- [![](https://img.shields.io/badge/Buy%20me%20a%20coffee-IRR%20|%20PayPing-Red.svg?style=for-the-badge&logo=ko-fi)](https://payping.ir/d/TXTS)
152
- <br />
153
- [![](https://img.shields.io/badge/Buy%20me%20a%20coffee-USD%20|%20PayPal-Red.svg?style=for-the-badge&logo=ko-fi)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=HJ5TBXVYTHS7N&currency_code=USD&source=url)
154
- <br />
155
- [![Donate with Bitcoin](https://en.cryptobadges.io/badge/big/3C5sj5BJ3n5gYJR27uxowdsgGCq2vjdhn5?showBalance=true)](https://en.cryptobadges.io/donate/bc1qknjsmsa98lljwxjwl4pmjh48s8su8r8ajkqd8w)
156
- [![Donate with Ethereum](https://en.cryptobadges.io/badge/big/0x018fbf3fAC7165b2c85f856cC90E2d9410415150?showBalance=true)](https://en.cryptobadges.io/donate/0x018fbf3fAC7165b2c85f856cC90E2d9410415150)
157
- [![Donate with Ripple](https://en.cryptobadges.io/badge/big/rt6ZTkKdBVYzBee9CpQsDTsewnTbAoV13?showBalance=true)](https://en.cryptobadges.io/donate/rt6ZTkKdBVYzBee9CpQsDTsewnTbAoV13)
159
+
160
+ > Love GreenTunnel? Please consider donating to sustain development.
161
+
162
+ **Ethereum / USDT (ERC-20):** `0xB116a6AE50c38a455944A65f9cEE4D54CEceF080`
163
+
164
+ ---
158
165
 
159
166
  ## License
160
- Licensed under the MIT license. See [LICENSE](https://github.com/SadeghHayeri/GreenTunnel/blob/master/LICENSE "LICENSE").
167
+
168
+ Licensed under the [MIT License](https://github.com/SadeghHayeri/GreenTunnel/blob/main/LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "green-tunnel",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "HTTPS",