Skip to content

Commit

Permalink
README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
netptop committed Mar 1, 2024
1 parent 5737a77 commit 7190dde
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 36 deletions.
42 changes: 6 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# siteproxy 2.0
<br />
<a href="https://github.com/netptop/siteproxy/blob/master/README_English.md"><strong>English</strong></a>
Siteproxy 2.0 使用了service worker, 使得代理更加稳定, 可以代理了的网站更多。
同时使用hono替代express,速度提高4倍。 支持cloudflare worker部署。
反向代理, 免翻墙访问youtube/google, 支持github和telegram web登录。
pure web page proxy to google/youtube, zero configuration from client side. Reverse proxy to all internet. 一键部署,翻墙利器。
纯web页面的在线代理, 客户端无需任何配置,反向代理到internet。

```
+----> google/youtube
Expand All @@ -21,8 +23,6 @@ user browser +-------------->+ siteproxy +-------> wikipedia
- [使用技巧](#使用技巧)
- [部署到cloudflare_worker](#部署到cloudflare_worker)
- [部署到vps或者云服务器](#部署到vps或者云服务器)
- [cloudflare_worker_deployment](#cloudflare_worker_deployment)
- [vps_deployment](#vps_deployment)
- [联系方式](#联系方式)

### 特点
Expand All @@ -31,8 +31,8 @@ user browser +-------------->+ siteproxy +-------> wikipedia
- 支持密码控制代理,知道密码才能访问代理。
- 不需要客户端的任何配置,访问代理网址即可访问全世界。
- 支持github和telegram web登录。
- enter siteproxy's address, and go surf on internet without censorship
- no proxy setting from client side is needed. zero configuration from client browser
- 输入部署siteproxy的代理网址,就可以访问全世界,并隐藏你的IP。
- 客户端不需要任何软件安装,客户浏览器也不需要任何配置。

### 使用技巧
1. 可以通过部署的siteproxy进行git clone,方法:
Expand Down Expand Up @@ -75,43 +75,13 @@ git clone https://your-proxy-domain.name/user-your-password/https/github.com/the
6. 打开并修改保存config.json文件:
{
"proxy_url": "https://your-proxy.domain.name", // 这个是你申请到的代理服务器域名
"token_prefix": "/user-SetYourPasswordHere/", // 这个实际上是你的网站密码,用来防止非法访问
"token_prefix": "/user-SetYourPasswordHere/", // 这个实际上是你的网站密码,用来防止非法访问,注意保留首尾的斜杠。
"description": "注意:token_prefix相当于网站密码,请谨慎设置。 proxy_url和token_prefix合起来就是访问网址。"
}
7. 执行:nohup node bundle.js &
8. 现在就可以在浏览器中访问你的域名了, 网址就是前面的proxy_url加上token_prefix.
9. 如果想套CloudFlare加速, 可以参考CloudFlare说明
```
### cloudflare_worker_deployment
```
1. Assume your domain is already managed under Cloudflare, and set the DNS of your proxy website's domain to any IP, such as 1.1.1.1.
2. Git clone this project, and use a text editor to open build/worker.js.
3. Search for the string http://localhost:5006 and replace it with your proxy website's domain, for example, https://your-proxy-domain.name. Also, search for user22334455 and change it to the password you want to set.
4. Create a worker, edit the worker, and copy and paste the edited worker.js from the previous step into the worker, then save and deploy.
5. Add a worker route, directing your-proxy-domain.name/* to the worker you just saved.
6. Now you can directly visit https://your-proxy-domain.name/user-your-password/, and it should work. Note to replace the domain and password with your own.
```

### vps_deployment
```
1. Create an SSL website (using certbot and nginx, Google the usage), configure nginx, /etc/nginx/sites-enabled/default should contain the following content: ... server { server_name your-proxy.domain.name; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://localhost:5006; } }
2. Execute: sudo systemctl start nginx
3. Under user environment, run the following commands to install Node environment, if you already have Node environment, skip this step:
(1) curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
(2) source ~/.bashrc
(3) nvm install v18
4. Execute: git clone https://github.com/netptop/siteproxy.git;
5. Execute: cd siteproxy;
6. Open and modify the config.json file and save:
{
"proxy_url": "https://your-proxy.domain.name",
"token_prefix": "/user-SetYourPasswordHere/",
"description": "Note: token_prefix acts as the website password, please set it carefully. proxy_url and token_prefix together form the access URL."
}
7. Execute: node bundle.js
8. Now you can access your domain in the browser, address is actually proxy_url+token_prefix.
9. If you want to use CloudFlare for acceleration, you can refer to CloudFlare's documentation.
```
### 联系方式
Telegram群: @siteproxy
<br />
Expand Down
84 changes: 84 additions & 0 deletions README_english.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Siteproxy 2.0
Siteproxy 2.0 uses service workers, making the proxy more stable and able to proxy more websites. It also uses Hono instead of Express, which quadruples the speed. It supports deployment on Cloudflare Workers. This reverse proxy allows access to YouTube/Google without needing to bypass internet censorship and supports login for GitHub and Telegram web.

It's a purely web-based online proxy, requiring no configuration on the client side; it reverse proxies to the internet.

```
+----> google/youtube
+----------------+ |
| | |
user browser +-------------->+ siteproxy +-------> wikipedia
| | |
+----------------+ |
+----> chinese forums
```

Please do not use this project for illegal purposes; you are responsible for the consequences.

## Table of Contents
- [Features](#features)
- [Usage Tips](#usage-tips)
- [Deploy to Cloudflare Worker](#deploy-to-cloudflare-worker)
- [Deploy to VPS or Cloud Server](#deploy-to-vps-or-cloud-server)
- [Contact Information](#contact-information)

### Features
- Uses Hono instead of Express, speeding up the service by four times.
- Supports deployment on Cloudflare Workers.
- Supports password-controlled access to the proxy; only those with the password can access the proxy.
- No client-side configuration needed; accessing the proxy URL grants access to the worldwide web.
- Supports login for GitHub and Telegram web.
- Accessing the worldwide web and hiding your IP is as simple as entering the URL of the deployed Siteproxy.
- No software installation or browser configuration required on the client side.

### Usage Tips
1. You can use the deployed Siteproxy for git clone operations like this:
```
git clone https://your-proxy-domain.name/user-your-password/https/github.com/the-repo-to-clone
```

### Deploy to Cloudflare Worker

```
1. Assuming your domain is already managed by Cloudflare, set your proxy website's domain DNS to any IP, such as 192.0.2.2, and ensure it is proxied, so the proxy status is: Proxied.
2. Git clone this project and open build/worker.js with a text editor (or just download this file directly).
3. Search for the string http://localhost:5006 and replace it with your proxy website domain, like https://your-proxy-domain.name. Also, search for user22334455 and change it to a password of your choosing.
4. Create a worker, edit the worker, and copy and paste the edited worker.js into it. Save and deploy.
5. Add a worker route, directing your-proxy-domain.name/* to the worker you just saved.
6. Now you can directly access https://your-proxy-domain.name/user-your-password/, with the domain and password replaced by your own.
```

### Deploy to VPS or Cloud Server
```
1. Create an SSL website (using certbot and nginx, look up usage) and configure nginx. /etc/nginx/sites-enabled/default should include the following content::
...
server {
server_name your-proxy.domain.name
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:5006;
}
}
2. Execute: sudo systecmctl restart nginx
3. Under user environment, run the following commands to install node environment, if you don't already have node, skip this step
(1)curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
(2)source ~/.bashrc
(3)nvm install v18
4. Execute:git clone https://github.com/netptop/siteproxy.git;
5. Execute:cd siteproxy;
6. Open and modify the config.json file then save:
{
"proxy_url": "https://your-proxy.domain.name", // This is your proxy server domain
"token_prefix": "/user-SetYourPasswordHere/", // This acts as your site password to prevent unauthorized access. Keep the slashes at both ends.
"description": "Note: token_prefix acts as your site password, set it carefully. proxy_url and token_prefix together form the access URL."
}
7. Execute: nohup node bundle.js &
8. Now, you can access your domain in a browser; the URL is the proxy_url followed by the token_prefix.
9. For Cloudflare acceleration, refer to Cloudflare documentation.
```
### Contact Information
Telegram group: @siteproxy
<br />
email: [email protected]

0 comments on commit 7190dde

Please sign in to comment.