-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added detailed TLS debugging information including: - Client handshake details - Connection state changes - TLS version and cipher negotiations - SNI hostname requests - ALPN protocol selection - Enhanced session ID handling: - Added support for Cloudflare headers (Cf-Ray) - Fallback to Cf-Connecting-Ip if needed - Maintained backward compatibility with X-Ephemeral - Improved error messaging for missing session IDs - Improved TLS configuration: - Added explicit version range (TLS 1.2 - 1.3) - Added HTTP/2 support via ALPN - Added SNI certificate handling - Removed unnecessary cipher restrictions - Enhanced debug logging: - Added connection state tracking - Added detailed header logging - Added TLS configuration details at startup - Added client capability logging
- Loading branch information
doxx
authored and
doxx
committed
Nov 27, 2024
1 parent
ad6755c
commit 5cb069c
Showing
13 changed files
with
310 additions
and
83 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
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,12 +1,12 @@ | ||
# DarkFlare Binary Checksums | ||
# Generated: Wed Nov 27 17:17:28 UTC 2024 | ||
# Generated: Wed Nov 27 18:28:12 UTC 2024 | ||
|
||
c71a5cf86a1280d00dd460046718ccfeee7a8aabbac3241b344bb87705bc7933 checksums.txt | ||
55acba659aa2e0fe1b6d1926c32988d7e33e53ad87582a0e547922fdcccfcedd darkflare-client-darwin-amd64 | ||
de1ef97574fe9a6310dd76df938ae0436d1b321f16218b6a142a4915f6ffc144 darkflare-client-darwin-arm64 | ||
bf887e178d20dc7f97e0984032afefefad41568a4a0c7a68f2fd67a5df1e314e darkflare-client-linux-amd64 | ||
5ba3cf40b182968195e7df419ffe3a5d02567256b529badd6bd9dd32f2ed49ea darkflare-client-windows-amd64.exe | ||
635e6593ac287be49cded64674a24a262fc1ae77047ec7beb0e2732a58d8fb52 darkflare-server-darwin-amd64 | ||
af68cf706364049dad8848d6f0bd1a24daae5d5e60db343057482622533df28b darkflare-server-darwin-arm64 | ||
57a529665b1a3ca0c7ef633afff3ec6a04020918f05e77203c91cb97ae6313ad darkflare-server-linux-amd64 | ||
62477e5d843ee7c33e2a99f42dcc7c7f34fb369fdced4d90570623accdb8f381 darkflare-server-windows-amd64.exe | ||
bef55901802edf53cfbf3bdd2db0e50202c67ee14c77f46fa2242c154617d3bc checksums.txt | ||
58c1df4743072ec1691378b65eac7e66beaaec60572f724e62eaf5be104dfea3 darkflare-client-darwin-amd64 | ||
17cf1c0b0c7e4bfba8602499e760b25ed37833f88c2e8afa68122408be3a881b darkflare-client-darwin-arm64 | ||
1a4a0539b645e6a9fef5eb3a633c4fabe9952bf1655ee402ca8f870f6c8655c3 darkflare-client-linux-amd64 | ||
260fcf233f40628347f8c6c7197d6549e2fc2b9079866e9cc25cb9d676b42eb6 darkflare-client-windows-amd64.exe | ||
df474dd2277f2fe4668c9c3d569a8cf8c2b6761f04a5c7a4212ac50dfb195c16 darkflare-server-darwin-amd64 | ||
b9b9e4475ba6055a33a9ce1c6ed605725afbd1a997b1508b1b0cbfb78fff3b13 darkflare-server-darwin-arm64 | ||
ada672ccb9ad4cb78499d640d233fcc3d052d7eb1a05c149a0485f74dd0ed1eb darkflare-server-linux-amd64 | ||
feedeb09aa65c81c1024122a25dd408bbe7e7ad4f1bfe42476af7a64665b4202 darkflare-server-windows-amd64.exe |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package cert | ||
|
||
import ( | ||
"crypto/ecdsa" | ||
"crypto/elliptic" | ||
"crypto/rand" | ||
"crypto/x509" | ||
"crypto/x509/pkix" | ||
"encoding/pem" | ||
"math/big" | ||
"net" | ||
"time" | ||
) | ||
|
||
func GenerateSelfSignedCert() (certPEM []byte, keyPEM []byte, err error) { | ||
// Generate private key | ||
privateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) | ||
if err != nil { | ||
return nil, nil, err | ||
} | ||
|
||
// Create certificate template | ||
template := x509.Certificate{ | ||
SerialNumber: big.NewInt(1), | ||
Subject: pkix.Name{ | ||
Organization: []string{"DarkFlare Server"}, | ||
}, | ||
NotBefore: time.Now(), | ||
NotAfter: time.Now().Add(365 * 24 * time.Hour), | ||
|
||
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, | ||
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, | ||
BasicConstraintsValid: true, | ||
DNSNames: []string{"localhost"}, | ||
IPAddresses: []net.IP{net.ParseIP("127.0.0.1")}, | ||
} | ||
|
||
// Create certificate | ||
derBytes, err := x509.CreateCertificate(rand.Reader, &template, &template, &privateKey.PublicKey, privateKey) | ||
if err != nil { | ||
return nil, nil, err | ||
} | ||
|
||
// Encode certificate | ||
certPEM = pem.EncodeToMemory(&pem.Block{ | ||
Type: "CERTIFICATE", | ||
Bytes: derBytes, | ||
}) | ||
|
||
// Encode private key | ||
privBytes, err := x509.MarshalPKCS8PrivateKey(privateKey) | ||
if err != nil { | ||
return nil, nil, err | ||
} | ||
|
||
keyPEM = pem.EncodeToMemory(&pem.Block{ | ||
Type: "PRIVATE KEY", | ||
Bytes: privBytes, | ||
}) | ||
|
||
return certPEM, keyPEM, nil | ||
} |
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
Oops, something went wrong.