Skip to content

Commit 74dad3a

Browse files
doxxdoxx
doxx
authored and
doxx
committed
Increase buffer size from 32KB to 128KB to improve download speeds.
1 parent 741f9d1 commit 74dad3a

10 files changed

+25
-18
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Breaking past blocked sites!
7272

7373
## NordVPN
7474

75-
1. Download the OpenVPN client
75+
1. Download the OpenVPN client (cli is better)
7676
2. Under Manual setup in your NordVPN web account download the .ovpn file for TCP
7777
3. Also in Manual setup select username and password authentication.
7878
4. Edit the .ovpn file and change the IP and port to your darkflare server IP and Port.
@@ -81,11 +81,13 @@ Breaking past blocked sites!
8181

8282
I did provide an ./examples/nordvpn.ovpn for you to use. Also two scrips for up/down to fix some of the routing issues.
8383

84-
Speed tests were around 30Mbps down and 10Mbps up with latency around 30-100ms. Streaming, etc... all seem to work fine.
84+
Using the OpenVPN commandline client you can embed the username, password, and it runs the scripts properly for you:
85+
```
86+
& openvpn --config 127.0.0.1.tcp2222.ovpn --script-security 2
87+
```
8588

86-
Note: OpenVPN does some weird thing with the default gateway/route. For testing purposes I added: pull-filter ignore "redirect-gateway" to the .ovpn file. That allows me to force the tunnel to not eat my network.
89+
Note: OpenVPN by default screws up the default gateway/route. For testing purposes I added: pull-filter ignore "redirect-gateway" to the .ovpn file. That allows me to force the tunnel to not change the routing. The routing can be fixed by the OpenVPN-up.sh and OpenVPN-down.sh scripts. This is due to the fact that the VPN is connecting to the whole CDN range of IP addresses.
8790

88-
![OpenVPN on NordVPN over TCPoCDN](https://raw.githubusercontent.com/doxx/darkflare/main/images/openvpn.jpg)
8991

9092
## 🔐 Few Obscureation Techniques
9193

bin/checksums.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# DarkFlare Binary Checksums
2-
# Generated: Tue Dec 3 17:54:24 UTC 2024
2+
# Generated: Tue Dec 3 19:19:42 UTC 2024
33

4-
a46b3d02d570810b4cd85423b9aa4a564e22086362de8b13ef8d7c10e64e129b checksums.txt
4+
d74d77f413a7607cb742678bb2cc35ea009ef9e9bedeb8f6461a4f5222c52a33 checksums.txt
55
444278a858153540bc7b8ba97435d6d73e93e5fb93cc767373606463b1410c16 darkflare-client-darwin-amd64
66
3d2eb54b97b4aa09949d94985e1dcc6fff363b22be8362d26b45e2f258403f98 darkflare-client-darwin-arm64
77
46de95f637486958231679b1ea53f5bb724c9b731d323c9cf0528c5cd2dc41d9 darkflare-client-linux-amd64
88
866618bb5ca641a8fa78823fa2dc4d235086c47d8ae7a2210613fd9b94bd4681 darkflare-client-linux-arm64
99
4dc79e82b47ce82ca894431756c0f9b5620fcc0d228bdbefbd106b7c354c17cd darkflare-client-windows-amd64.exe
10-
fed50b0112f4c80e15376294efa1e7b6f7e6543ff2fe145b177cd69c0dc3b7d0 darkflare-server-darwin-amd64
11-
61ee16be9e15cf94edf77740ee54d201e25343e5794fbee1b16aa8bb6d5a7fb2 darkflare-server-darwin-arm64
12-
6870ba3b61938d43138f30b99e1685a9917570cd95e197e59b641cd54d90343d darkflare-server-linux-amd64
13-
d7e4e70e41df73291305552efdc9ee1b4af98f8b54480ed0a7ce159b3f455466 darkflare-server-linux-arm64
14-
8f7c75ed6b08f15dbfa289c17a44e9ddfe2fbf08012f1d3e2804be595ba5c2e9 darkflare-server-windows-amd64.exe
10+
0df41165f843f3e53c9de5d9c5ec94660696d20cc6b6da3f28fe9ddaee696e4f darkflare-server-darwin-amd64
11+
05d6156bd38ac90784ff4b862cbc83d9c77b047237f0d731b10faf78b728878c darkflare-server-darwin-arm64
12+
88a2c60f99d0372d7e71593f724fbedef1a5cdd4c53eb215e87f969f6d6788ae darkflare-server-linux-amd64
13+
404ed6254b31f39ee42a6906d9b1a6d2af8050e2f81df14316ac95e9db3f9c70 darkflare-server-linux-arm64
14+
9178c5f3f06182ef150237b8aa97802679b2def2edde271c909c81271aca7a6b darkflare-server-windows-amd64.exe

bin/darkflare-server-darwin-amd64

0 Bytes
Binary file not shown.

bin/darkflare-server-darwin-arm64

-16.1 KB
Binary file not shown.

bin/darkflare-server-linux-amd64

3.75 KB
Binary file not shown.

bin/darkflare-server-linux-arm64

1.95 KB
Binary file not shown.
-1 KB
Binary file not shown.

examples/OpenVPN-down.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Exit on any error
44
set -e
55

6+
# Set PATH to include common system binary locations
7+
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
8+
69
# File containing the original default gateway
710
default_route_file="default-router.txt"
811

examples/OpenVPN-up.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Exit on any error
44
set -e
55

6+
# Set PATH to include common system binary locations
7+
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
8+
69
# File to save the original default route
710
default_route_file="default-router.txt"
811

server/main.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,11 @@ func (s *Server) handleRequest(w http.ResponseWriter, r *http.Request) {
375375
}
376376

377377
// For GET requests, read any available data
378-
buffer := make([]byte, 32*1024) // 32KB buffer
379-
readData := make([]byte, 0, 64*1024) // 64KB initial capacity
378+
buffer := make([]byte, 128*1024) // 128KB buffer
379+
readData := make([]byte, 0, 256*1024) // 256KB initial capacity
380380

381381
for {
382-
session.conn.SetReadDeadline(time.Now().Add(100 * time.Millisecond)) // Increased from 10ms to 100ms
382+
session.conn.SetReadDeadline(time.Now().Add(250 * time.Millisecond)) // Increased from 10ms to 250ms
383383
n, err := session.conn.Read(buffer)
384384
if err != nil {
385385
if err != io.EOF && !err.(net.Error).Timeout() {
@@ -394,7 +394,7 @@ func (s *Server) handleRequest(w http.ResponseWriter, r *http.Request) {
394394
if n > 0 {
395395
readData = append(readData, buffer[:n]...)
396396
}
397-
if n < len(buffer) || len(readData) >= 64*1024 { // Added size limit check
397+
if n < len(buffer) || len(readData) >= 256*1024 { // Added size limit check
398398
break
399399
}
400400
}
@@ -440,9 +440,8 @@ func (s *Server) trackSessionStats(sessionID string, session *Session) {
440440
upKbps := float64(upBytes*8) / (1024 * duration)
441441
downKbps := float64(downBytes*8) / (1024 * duration)
442442

443-
log.Printf("[%s] Stats: ID=%s, Source=%s, Up=%d bytes (%.2f kbps), Down=%d bytes (%.2f kbps)",
444-
time.Now().Format(time.RFC3339),
445-
sessionID[:8],
443+
log.Printf("Stats: ID=%s, Source=%s, Up=%d bytes (%.2f kbps), Down=%d bytes (%.2f kbps)",
444+
sessionID,
446445
session.sourceIP,
447446
upBytes,
448447
upKbps,

0 commit comments

Comments
 (0)