forked from netptop/siteproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
150 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,154 @@ | ||
# Siteproxy 2.0 | ||
<br> | ||
Siteproxy 2.0 uses a service worker to make the proxy more stable, enabling it to support a wider range of websites. It replaces Express with Hono, which increases the speed by four times. It supports deployment on Cloudflare Workers. This reverse proxy allows for the access to YouTube/Google without the need for a VPN, and supports login for GitHub and Telegram web (please be cautious not to log in through untrusted proxies). It's a purely web-based online proxy that requires no configuration on the client's side, acting as a reverse proxy to the internet. | ||
<br> | ||
Supports duckduckgo AI Chat(can access gpt3.5 and claude3 for free). | ||
<br> | ||
Please do not use this project for illegal purposes, or you will bear the consequences. | ||
<br> | ||
Note: To reduce the risk of phishing, the code of siteproxy 2.0 is obfuscated, and the modification of the default homepage URL is prohibited. | ||
|
||
## Contents | ||
- [Features](#features) | ||
- [Usage Tips](#usage-tips) | ||
- [Deploying to Cloudflare Worker](#deploying-to-cloudflare-worker) | ||
- [Deploying to Cloudflare Pages](#deploying-to-cloudflare-page) | ||
- [Deploying to VPS or Cloud Server](#deploying-to-vps-or-cloud-server) | ||
- [Docker deployment](#docker-deployment) | ||
- [Thanks](#Thanks) | ||
- [Contact Information](#contact-information) | ||
|
||
### Features | ||
- Replaces Express with Hono, improving speed by four times. | ||
- Supports deployment on Cloudflare Workers. | ||
- Supports password-controlled access to the proxy; only those with the password can access the proxy. | ||
- Supports duckduckgo AI Chat(can access gpt3.5 and claude3 for free). | ||
- No configuration is required on the client side; simply access the proxy URL to reach the entire world. | ||
- Supports login for GitHub and Telegram web. | ||
- Uses RSA+AES encryption to protect user login passwords to reduce the risk of man-in-the-middle attacks. | ||
- By entering the deployed Siteproxy proxy URL, you can access the entire world and hide your IP. | ||
- No software installation is required on the client side, and the client's browser does not need any configuration. | ||
|
||
### Usage Tips | ||
1. You can use the deployed Siteproxy to perform a git clone, for example: | ||
``` | ||
git clone https://your-proxy-domain.name/user-your-password/https/github.com/the-repo-to-clone | ||
``` | ||
# SiteProxy 2.0 | ||
|
||
SiteProxy is a **powerful online proxy tool** that leverages the latest technologies to enhance stability and compatibility. We are committed to providing **simple, efficient, and secure** proxy services to deliver the best internet access experience. | ||
|
||
- **Super High Performance**: Replaces the traditional Express server with Hono, improving performance by 4 times for a smoother user experience. | ||
- **Cloud Deployment**: Fully supports Cloudflare Worker deployment for quick and efficient service. | ||
- **AI Smart Chat**: Integrates DuckDuckGo AI Chat, offering free GPT-3.5 and Claude 3, making your proxy service smarter. | ||
- **Advanced Security Protection**: Supports password-controlled access, ensuring only authorized users can use the proxy, significantly enhancing security. | ||
- **Zero Configuration Use**: Users need no client configuration; simply access the proxy URL to surf the global internet. | ||
- **Convenient Login**: Fully supports GitHub and Telegram Web login for simple and fast operations. | ||
- **Strong Encryption**: Utilizes `RSA + AES` dual encryption technology to protect user login passwords and prevent man-in-the-middle attacks. | ||
- **Privacy Protection**: Access the global internet via the proxy URL while hiding the user's real IP to protect privacy. | ||
- **Seamless Experience**: No software installation or browser configuration is needed; just use it immediately for an extremely convenient user experience. | ||
|
||
<details> | ||
<summary>View Principle</summary> | ||
|
||
### Deploying to Cloudflare Worker | ||
- Assume your domain is already managed under Cloudflare (in case you want to use your domain name) | ||
- Download the [link](https://raw.githubusercontent.com/netptop/siteproxy/master/build/worker.js) and use a text editor to open it. | ||
- Search for the string http://localhost:5006 and replace it with your proxy server's domain, such as https://your-proxy-domain.name. Must be https please. Also, search for user22334455 and change it to a password of your choosing, empty password means no password is needed. | ||
- Create a worker and edit it by copying and pasting the modified worker.js into the worker, then save and deploy. | ||
- If you use cloudflare worker domain, skip this step, If you want to use your own domain name, on the Workers & Pages page, open the worker you just saved, click 'Settings'->'Triggers' at the top, then 'Add custom domain', setting it to your proxy domain. | ||
- Now you can directly access https://your-proxy-domain.name/user-your-password/, don't miss the last '/' please. And please replace the domain and password with your own. | ||
|
||
### Deploying to Cloudflare Pages | ||
- Assume your domain is already managed under Cloudflare. | ||
- Run `git clone https://github.com/netptop/siteproxy.git`. | ||
- Open `siteproxy/build/cf_page/_worker.js` with a text editor. Search for the string `http://localhost:5006` and replace it with your proxy server's domain, such as `https://your-proxy-domain.name`. Make sure to switch it to HTTPS. | ||
- Also, search for `user22334455` and change it to the password you want to set. If left empty, it will allow access without a password. Save the changes. | ||
- Log in to Cloudflare. In the "Workers & Pages" section, use the "Direct Upload" feature to create a new page by uploading the `siteproxy/build/cf_page` directory. | ||
- In the Workers & Pages interface, open the page you just deployed, click on 'Custom Domains' at the top, and then 'Add Custom Domain'. Set it to your proxy domain. Activate the domain. | ||
- Now you can directly access `https://your-proxy-domain.name/user-your-password/`. The trailing slash is required. Make sure to replace the domain and password with your own. | ||
|
||
### Deploying to VPS or Cloud Server | ||
- node v21 or above version is needed. | ||
``` | ||
1. Set up an SSL website (using Certbot and Nginx, Google for instructions) and configure Nginx. Your /etc/nginx/conf.d/default.conf should include the following: | ||
... | ||
server { | ||
server_name your-proxy.domain.name | ||
location / { | ||
proxy_pass http://localhost:5006; | ||
} | ||
} | ||
2. Execute: sudo systemctl restart nginx | ||
3. Install Node v21 or above version in user space, if you don't already have Node v21 installed: | ||
(1)curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | ||
(2)source ~/.bashrc | ||
(3)nvm install v21 | ||
4. Execute: git clone https://github.com/netptop/siteproxy.git; | ||
5. Execute: cd siteproxy; | ||
6. Test if it can run: node bundle.js, if there are no errors, end the program with Ctrl+C. | ||
7. Open and modify the config.json file, saving it: | ||
{ | ||
"proxy_url": "https://your-proxy.domain.name", // This is your proxy server domain, must be https please. | ||
"token_prefix": "/user-SetYourPasswordHere/", // This acts as your site password to prevent unauthorized access. Keep the slashes at the start and end. empty password means no password is needed. | ||
"local_listen_port": 5006, // Do not modify this, to keep it consistent with the previous nginx configuration. | ||
"description": "Note: The token_prefix acts as the site password. Please set it carefully. The proxy_url combined with the token_prefix forms the access URL." | ||
} | ||
8. Install forever: npm install -g forever; | ||
9 .Execute: forever stopall; forever start bundle.js | ||
10. Now you can access your domain in the browser, the URL is the aforementioned proxy_url followed by token_prefix. | ||
11. If you want to use CloudFlare for acceleration, you can refer to the CloudFlare instructions. | ||
``` | ||
### Docker deployment | ||
``` | ||
1. Configure the domain's SSL certificate and nginx, directing it to the local port 5006. | ||
2. Git clone this project. | ||
3. Open and modify the config.json file then save it: | ||
{ | ||
"proxy_url": "https://your-proxy.domain.name", // This is the domain name of your proxy server | ||
"token_prefix": "/user-SetYourPasswordHere/", // This is essentially your website password, used to prevent unauthorized access. Be sure to retain the slashes at the start and end. | ||
"description": "Note: The token_prefix acts as a website password, please set it carefully. The proxy_url combined with the token_prefix forms the access URL." | ||
} | ||
4. Enter the docker-node subdirectory. sudo docker compose up | ||
5. Now, you can directly access https://your-proxy-domain.name/user-your-password/, and it should work. Note that you should replace the domain and password with your own. | ||
+----> google/youtube | ||
+----------------+ | | ||
| | | | ||
user browser +-------------->+ siteproxy +-------> wikipedia | ||
| | | | ||
+----------------+ | | ||
+----> chinese forums | ||
``` | ||
### Thanks | ||
www.netptop.com default page was designed by telgram user: SenZyo, Thanks for contributions! | ||
|
||
### Contact Information | ||
Telegram group: @siteproxy | ||
<br /> | ||
email: [email protected] | ||
</details> | ||
|
||
> [!CAUTION] | ||
> This project must not be used for any illegal purposes. Users are responsible for their actions. | ||
> [!WARNING] | ||
> Due to the support for multiple website logins, to reduce phishing risks, SiteProxy in version 2.0 obfuscates the code and prohibits modifying the default homepage URL. | ||
## Demonstration | ||
|
||
A demonstration by a Telegram user of SiteProxy deployment and speed test with optimized IPs: | ||
![Download Speed test](https://raw.githubusercontent.com/netptop/siteproxy/master/test.png) | ||
|
||
## Deployment to Cloudflare Pages | ||
|
||
1. **Ensure Domain Management**: | ||
- Make sure your domain is managed under Cloudflare. | ||
2. **Clone Repository**: | ||
- Execute the command: `git clone https://github.com/netptop/siteproxy.git` | ||
3. **Edit Configuration File**: | ||
- Open the `siteproxy/build/cf_page/_worker.js` file with a text editor. | ||
- Search and replace the string `http://localhost:5006` with your proxy server domain, e.g., `https://your-proxy-domain.com` (ensure to use `https`). | ||
- Search and replace the string `user22334455` with your desired access password. If the password is empty, it means no password is required for access. Save the file. | ||
4. **Log in to Cloudflare**: | ||
- Go to the **Workers and Pages** section, choose **Create a Page by Direct Upload**, and upload the `siteproxy/build/cf_page` directory for deployment. | ||
5. **Configure Custom Domain**: | ||
- On the **Workers & Pages** page, open the just-deployed Page. | ||
- Click on **Custom Domains** at the top, then choose **Add Custom Domain**, set it to your proxy domain, and activate the domain. | ||
6. **Access Proxy Service**: | ||
- Now you can access the proxy service via `https://your-proxy-domain.com/your-password/` (ensure the trailing slash exists). Remember to replace the domain and password with your own. | ||
|
||
## Deployment to Cloudflare Workers | ||
|
||
1. **Ensure Domain Management**: | ||
- Make sure your domain is managed under Cloudflare. | ||
2. **Download and Edit Worker File**: | ||
- Download the `build/worker.js` file: [link](https://raw.githubusercontent.com/netptop/siteproxy/master/build/worker.js), and open it with a text editor. | ||
- Search and replace the string `http://localhost:5006` with your proxy server domain, e.g., `https://your-worker-domain.com` (ensure to use `https`). | ||
- Search and replace the string `user22334455` with your desired access password. If the password is empty, it means no password is required for access. | ||
3. **Create Worker**: | ||
- Log in to Cloudflare, go to the **Workers and Pages** section, and create a Worker. | ||
- Edit the newly created Worker, copy and paste the edited `worker.js` file content into the Worker, save and deploy it. | ||
4. **Configure Custom Domain**: | ||
- On the **Workers & Pages** page, open the just-saved Worker. | ||
- Click on **Settings -> Triggers** at the top, then choose **Add Custom Domain**, and set it to your proxy domain. The DNS page should show the corresponding DNS type as Worker after setting the custom domain. | ||
5. **Access Proxy Service**: | ||
- Now you can access the proxy service via `https://your-worker-domain.com/your-password/` (ensure the trailing slash exists, and replace with your own domain and password). | ||
|
||
## Deployment to VPS or Cloud Server | ||
|
||
1. **Create SSL Website**: | ||
- Use `certbot` and `nginx` to create an SSL website. You can Google for specific usage. | ||
- Configure `nginx`, ensuring the `/etc/nginx/conf.d/default.conf` file contains the following: | ||
```nginx | ||
server { | ||
server_name your-proxy.domain.name; | ||
location / { | ||
proxy_pass http://localhost:5006; | ||
} | ||
} | ||
``` | ||
2. **Restart nginx**: | ||
- Execute the command: `sudo systemctl restart nginx` | ||
3. **Install Node.js v21 or Higher**: | ||
- Execute the following commands: | ||
```bash | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | ||
source ~/.bashrc | ||
nvm install v21 | ||
``` | ||
4. **Clone Repository**: | ||
- Execute the command: `git clone https://github.com/netptop/siteproxy.git` | ||
5. **Enter Project Directory**: | ||
- Execute the command: `cd siteproxy` | ||
6. **Test Run**: | ||
- Execute the command: `node bundle.js` | ||
- If there are no errors, press `Ctrl+C` to end the program. | ||
7. **Modify Configuration File**: | ||
- Open and modify the `config.json` file, as follows: | ||
```json | ||
{ | ||
"proxy_url": "https://your-proxy.domain.name", // Replace with your proxy server domain, ensure to use https | ||
"token_prefix": "/user-SetYourPasswordHere/", // Set the website password to prevent unauthorized access, keep the slashes. Empty means no password. | ||
"local_listen_port": 5006, // Do not modify to ensure consistency with nginx configuration | ||
"description": "Note: token_prefix is equivalent to a website password, please set it carefully. The combination of proxy_url and token_prefix is the access URL." | ||
} | ||
``` | ||
8. **Install Forever**: | ||
- Execute the command: `npm install -g forever` | ||
9. **Start Application**: | ||
- Execute the command: `forever stopall && forever start bundle.js` | ||
10. **Access Proxy Service**: | ||
- Access your domain in the browser with the URL being the combination of `proxy_url` and `token_prefix`. | ||
11. **Use Cloudflare Acceleration (Optional)**: | ||
- Refer to Cloudflare's official instructions for setup. | ||
Now, your proxy service has been successfully deployed and can be accessed through the browser. | ||
## Docker Deployment | ||
1. **Configure SSL Certificate and Nginx**: | ||
- Configure the SSL certificate and Nginx for the domain, directing it to the local port 5006. | ||
2. **Clone Repository**: | ||
- Execute the command: `git clone https://github.com/netptop/siteproxy.git` | ||
3. **Edit Configuration File**: | ||
- Open and modify the `config.json` file as follows: | ||
```json | ||
{ | ||
"proxy_url": "https://your-proxy-domain.com", // Replace with your obtained proxy server domain | ||
"token_prefix": "/user-SetYourPasswordHere/", // Set the website password to prevent unauthorized access, keep the slashes | ||
"description": "Note: token_prefix is equivalent to a website password, please set it carefully. The combination of proxy_url and token_prefix is the access URL." | ||
} | ||
``` | ||
- Save the file. | ||
4. **Start Docker Container**: | ||
- Enter the `docker-node` subdirectory. | ||
- Execute the command: `sudo docker compose up` | ||
5. **Access Proxy Service**: | ||
- Now you can access the proxy service via `https://your-proxy-domain.com/user-your-password/`. Please replace the domain and password with your own. | ||
## Acknowledgements | ||
- The default homepage of netptop.com was designed by Telegram user SenZyo. Thank you for the contribution! | ||
- Documentation was written by [LAGSNES](https://github.com/SNESNya). | ||
## Contact | ||
Telegram group: https://siteproxy.t.me | ||
E-mail: [[email protected]](mailto:[email protected]) |