Skip to content

Commit

Permalink
add third relay and make new build
Browse files Browse the repository at this point in the history
  • Loading branch information
uoosef committed Sep 2, 2023
1 parent 9a544b9 commit dac1a86
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The worker also implements a simple DNS proxy by forwarding DNS queries to a cus

- Supports IPv6
- Supports UDP
- More reliable loopback connections to Cloudflare IPs
- More reliable loopback connections to Cloudflare IPs
- Overall improved performance and stability
- DNS

Expand All @@ -45,7 +45,7 @@ The worker also implements a simple DNS proxy by forwarding DNS queries to a cus

```
├── src
│ ├── dns.js // DNS message encoding/parsing
│ ├── dns.js // DNS message encoding/parsing
│ └── worker.ts // Main worker code
├── dist
│ └── worker.js // Compiled worker script
Expand All @@ -63,7 +63,7 @@ You can deploy this worker to your Cloudflare account automatically with one cli

[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/user/bepass-worker)

### Manual Deployment
### Manual Deployment

To manually deploy the worker:

Expand All @@ -78,7 +78,7 @@ To manually deploy the worker:
9. Click the **Save and Deploy** button
10. Write down the newly created worker address, it should be something like **[name].[username].workers.dev**
11. Change your Bepass configuration to **https://[name].[username].workers.dev/dns-query**
---
---
### Add your own relay

**1. Follow the [relay set-up instructions](https://github.com/uoosef/cf-bepass#how-to-share-my-node-becoming-a-volunteer-maintainer) to run your own relay server.**
Expand All @@ -89,26 +89,26 @@ In the `worker.js` file, locate the following code:

```js
// src/worker.ts
var proxyIPs = ["relay1.bepass.org", "relay2.bepass.org"];
var proxyIPs = ["relay1.bepass.org", "relay2.bepass.org", "relay3.bepass.org"];
var proxyPort = 6666;
var proxyIP = proxyIPs[Math.floor(Math.random() * proxyIPs.length)];
```

Add the IP address or domain of your relay server. For example:
Remove public relay addresses and Add the IP address or domain of your relay server. For example:

```js
// src/worker.ts
var proxyIPs = ["relay1.bepass.org", "relay2.bepass.org", "relay.example.com", "123.45.67.89"]; // Add your server IP/domain here
var proxyIPs = ["relay.example.com", "123.45.67.89"]; // Add your server IP/domain here
var proxyPort = 6666;
var proxyIP = proxyIPs[Math.floor(Math.random() * proxyIPs.length)];
```

## Usage Limits

Cloudflare's free workers are limited to 100,000 requests per day. This is sufficient for personal use by one user or a small family.
Cloudflare's free workers are limited to 100,000 requests per day. This is sufficient for personal use by one user or a small family.

For most personal usage, the free worker should be adequate. But if you experience rate limiting, you may need to deploy workers on multiple accounts.


### 📦 Installation

Expand Down
2 changes: 1 addition & 1 deletion dist/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Buffer } from 'buffer'
import {isIP, inRange} from 'range_check';
import Message from './dns';

const proxyIPs = ["relay1.bepass.org", "relay2.bepass.org"];
const proxyIPs = ["relay1.bepass.org", "relay2.bepass.org", "relay3.bepass.org"];
const proxyPort = 6666;
let proxyIP = proxyIPs[Math.floor(Math.random() * proxyIPs.length)];
const dnsHost = "1.1.1.1"
Expand Down

0 comments on commit dac1a86

Please sign in to comment.