AI prompts
base on A simple DPI bypass tool written in go # Bepass: A DPI-nightmare proxy
<sub>
<sup>
```
_____ _____ _____ _____ _____ _____
/\ \ /\ \ /\ \ /\ \ /\ \ /\ \
/::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \
/::::\ \ /::::\ \ /::::\ \ /::::\ \ /::::\ \ /::::\ \
/::::::\ \ /::::::\ \ /::::::\ \ /::::::\ \ /::::::\ \ /::::::\ \
/:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \
/:::/__\:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ /:::/__\:::\ \
/::::\ \:::\ \ /::::\ \:::\ \ /::::\ \:::\ \ /::::\ \:::\ \ \:::\ \:::\ \ \:::\ \:::\ \
/::::::\ \:::\ \ /::::::\ \:::\ \ /::::::\ \:::\ \ /::::::\ \:::\ \ ___\:::\ \:::\ \ ___\:::\ \:::\ \
/:::/\:::\ \:::\ ___\ /:::/\:::\ \:::\ \ /:::/\:::\ \:::\____\ /:::/\:::\ \:::\ \ /\ \:::\ \:::\ \ /\ \:::\ \:::\ \
/:::/__\:::\ \:::| | /:::/__\:::\ \:::\____\ /:::/ \:::\ \:::| | /:::/ \:::\ \:::\____\ /::\ \:::\ \:::\____\ /::\ \:::\ \:::\____\
\:::\ \:::\ /:::|____| \:::\ \:::\ \::/ / \::/ \:::\ /:::|____| \::/ \:::\ /:::/ / \:::\ \:::\ \::/ / \:::\ \:::\ \::/ /
\:::\ \:::\/:::/ / \:::\ \:::\ \/____/ \/_____/\:::\/:::/ / \/____/ \:::\/:::/ / \:::\ \:::\ \/____/ \:::\ \:::\ \/____/
\:::\ \::::::/ / \:::\ \:::\ \ \::::::/ / \::::::/ / \:::\ \:::\ \ \:::\ \:::\ \
\:::\ \::::/ / \:::\ \:::\____\ \::::/ / \::::/ / \:::\ \:::\____\ \:::\ \:::\____\
\:::\ /:::/ / \:::\ \::/ / \::/____/ /:::/ / \:::\ /:::/ / \:::\ /:::/ /
\:::\/:::/ / \:::\ \/____/ ~~ /:::/ / \:::\/:::/ / \:::\/:::/ /
\::::::/ / \:::\ \ /:::/ / \::::::/ / \::::::/ /
\::::/ / \:::\____\ /:::/ / \::::/ / \::::/ /
\::/____/ \::/ / \::/ / \::/ / \::/ /
~~ \/____/ \/____/ \/____/ \/____/
```
</sup>
</sub>
![Disclaimer](https://img.shields.io/badge/⚠%20WARNING-EXPERIMENTAL-red)
## Table of Contents
- [Bepass: DPI Bypassing Tool and Cloudflare Worker Proxy](#bepass-dpi-bypassing-tool-and-cloudflare-worker-proxy)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Features](#features)
- [Usage](#usage)
- [Configuration Parameters](#configuration-parameters)
- [Build Instructions](#build-instructions)
- [CLI Version](#cli-version)
- [GUI Version (Work in Progress)](#gui-version-work-in-progress)
- [Deployment](#deployment)
- [CLI Deployment](#cli-deployment)
- [Roadmap](#roadmap)
- [License](#license)
## Introduction
Bepass is an advanced tool designed to bypass Iran's Deep Packet Inspection (DPI) system using a TLS client hello splitting attack. It also enables the deployment of a VLESS-like proxy on Cloudflare Workers. This README provides an overview of the project's features, build instructions, deployment guidelines, and more.
## Features
- **DPI Bypass:** Supports all of Iran's network carriers with customized TLS hello packet length adjustments.
- **DNS Over HTTPS (DOH) Support:** Facilitates secure and private DNS resolution.
- **Server Name Indication DNS (SDNS) Support:** Enhances DNS resolution efficiency.
- **Cross-Platform Compatibility:** Suitable for various operating systems.
## Usage
You can run the CLI version of Bepass as follows:
1. download the latest release from [here](https://github.com/uoosef/bepass/releases) based on your operating system
2. extract the zip file
3. create a `config.json` file in the same directory as the executable file
4. run the executable file
Example Configuration(`config.json` file) for IR-MCI:
```json
{
"TLSHeaderLength": 5,
"TLSPaddingEnabled": false,
"TLSPaddingSize": [
40,
80
],
"RemoteDNSAddr": "https://1.1.1.1/dns-query",
"EnableDNSFragmentation": false,
"DnsCacheTTL": 3000000,
"DnsRequestTimeout": 10,
"BindAddress": "0.0.0.0:8085",
"ChunksLengthBeforeSni": [
2000,
2000
],
"SniChunksLength": [
1,
2
],
"ChunksLengthAfterSni": [
2000,
2000
],
"DelayBetweenChunks": [
10,
20
],
"WorkerAddress": "https://<your_worker>.workers.dev/dns-query",
"WorkerIPPortAddress": "104.16.246.91:8443",
"WorkerEnabled": true,
"WorkerDNSOnly": false,
"EnableLowLevelSockets": false,
"Hosts": [
{
"Domain": "yarp.lefolgoc.net",
"IP": "5.39.88.20"
}
],
"UDPBindAddress": "0.0.0.0",
"UDPReadTimeout": 120,
"UDPWriteTimeout": 120,
"UDPLinkIdleTimeout": 120
}
```
### Configuration Parameters
1. `"TLSHeaderLength": 5`: Specifies the length of the TLS header, which is set to 5 bytes.
2. `"TLSPaddingEnabled": false`: Disables/Enable TLS padding.
3. `"TLSPaddingSize": [40, 80]`: Sets the TLS padding size range to be between 40 and 80 bytes.
4. `"RemoteDNSAddr": "https://1.1.1.1/dns-query"`: Specifies the remote DNS address for DNS queries. In this case, it's set to Cloudflare's DNS over HTTPS (DOH) service.
5. `"EnableDNSFragmentation": false`: Disables/Enable DNS fragmentation.
6. `"DnsCacheTTL": 3000000`: Sets the Time To Live (TTL) for DNS cache entries(seconds).
7. `"DnsRequestTimeout": 10`: Sets the timeout for DNS requests to 10 seconds.
8. `"BindAddress": "0.0.0.0:8085"`: Sets the bind address for the proxy server to listen on all available network interfaces (`0.0.0.0`) on port `8085`.
9. `"ChunksLengthBeforeSni": [2000, 2000]`: Specifies the length of chunks before the Server Name Indication (SNI) in the TLS handshake to be 2000 bytes.
10. `"SniChunksLength": [5, 10]`: Sets the SNI chunk length to be between 5 and 10 bytes.
11. `"ChunksLengthAfterSni": [2000, 2000]`: Specifies the length of chunks after the SNI in the TLS handshake to be 2000 bytes.
12. `"DelayBetweenChunks": [10, 20]`: Sets the delay between sending chunks to be between 10 and 20 milliseconds.
13. `"WorkerAddress": "https://<your_worker>.workers.dev/dns-query"`: Specifies the Cloudflare Worker address for proxy services.
14. `"WorkerIPPortAddress": "104.17.196.93:2096"`: Sets the IP address and port for the Cloudflare Worker.find clean CF IP and repalce it with this one to get better performance based on your internet quality and isp.
15. `"WorkerEnabled": true`: Disables/Enable the use of the Cloudflare Worker.
16. `"WorkerDNSOnly": false`: Indicates whether the Cloudflare Worker should be used for DNS queries only(If you just want to use the DOH over the worker set `true`. But if you want a full-fledged TCP SOCKS5 proxy over the worker set `false`).
17. `"EnableLowLevelSockets": false`: Disables/Enable low-level socket functionality.
18. `"Hosts": [{ "Domain": "yarp.lefolgoc.net", "IP": "5.39.88.20" }]`: Specifies a list of custom hosts to map domain names to IP addresses. In this example, "yarp.lefolgoc.net" is mapped to "5.39.88.20."
19. `"UDPBindAddress": "0.0.0.0"`: Sets the UDP bind address to listen on all available network interfaces (`0.0.0.0`).
20. `"UDPReadTimeout": 120`: Sets the UDP read timeout to 120 seconds.
21. `"UDPWriteTimeout": 120`: Sets the UDP write timeout to 120 seconds.
22. `"UDPLinkIdleTimeout": 120`: Sets the UDP link idle timeout to 120 seconds.
Please note that you should replace `<your_worker>` in `"WorkerAddress"` with your actual Cloudflare Worker address. Additionally, ensure that you configure other settings as needed for your specific use case.
## Build Instructions
### CLI Version
You can build the CLI version of Bepass as follows:
```bash
git clone https://github.com/uoosef/bepass.git
cd bepass/bepass
make # Build CLI debug version
make release # Build CLI release version
```
### GUI Version (Work in Progress)
You can build GUI debug and release versions as follows:
```bash
git clone https://github.com/uoosef/bepass.git
cd bepass/bepass
make gui # For GUI debug version
make gui-release # For GUI release version
```
A graphical user interface (GUI) version of Bepass is under development. Stay tuned for updates on its availability.
## Deployment
### CLI Deployment
You can download the latest build from the release or just install Go 1.19+ and run:
```bash
git clone https://github.com/uoosef/bepass.git
cd bepass/bepass
go build ./cmd/cli/main.go
```
It should give you an executable file, or you can simply run it in place.
```bash
git clone https://github.com/uoosef/bepass.git
cd bepass/bepass
go run ./cmd/cli/main.go -c config.json
```
## Roadmap
project roadmap includes:
- [x] Self-Hosted DOH (Completed)
- [x] TCP Proxy Over Worker (Completed)
- [x] UDP Over Relay (Completed)
- [x] Relay (Completed)
- [x] Nekobox Plugin (Completed)
- [ ] MultiPlatform GUI Version (WIP)
- [ ] Standelone Server
- [ ] Packet Level Mux
- [ ] Jesus Protocol
## License
This project is open-source and licensed under the [MIT License](https://choosealicense.com/licenses/mit/). Feel free to contribute and use it in accordance with the license terms.
⚠ Use this tool responsibly and ensure compliance with local laws and regulations. ⚠
", Assign "at most 3 tags" to the expected json: {"id":"7911","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"