Skip to content

Commit aab663d

Browse files
doxxdoxx
doxx
authored and
doxx
committed
Update readme
1 parent d29e1ad commit aab663d

File tree

1 file changed

+134
-0
lines changed

1 file changed

+134
-0
lines changed

README.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ I used 8080 with a Cloudflare proxy via HTTP for the firs test. Less overhead.
117117
- **Base64 encoded destination transmission**: The server no longer requires a destination parameter (-d has been removed)
118118
- **Reverse Proxy Support**: The client now supports SOCKS5 and HTTP(s) proxies.
119119
- **Custom 302**: Server now has defined 302 redirects for non-auth users.
120+
- **stdin:stdout**: stdin:stdout client mode for client to avoid firewall restrictions and binding to local ports.
120121

121122
## 🚀 Quick Start
122123

@@ -184,6 +185,139 @@ Note: Keep your private key secure and never share it. The certificate provided
184185
ssh user@localhost -p 2222
185186
```
186187

188+
## 🔌 stdin:stdout Client Mode
189+
190+
DarkFlare now supports stdin:stdout mode, allowing you to use the client without binding to local ports. This is particularly useful when:
191+
- You don't have privileges to bind to local ports
192+
- Local firewalls restrict port binding
193+
- You want to integrate with SSH's ProxyCommand
194+
195+
### Using with SSH
196+
The most common use case is with SSH's ProxyCommand. Add to your ~/.ssh/config:
197+
```bash
198+
Host my-remote
199+
HostName remote-server.example.com
200+
User myuser
201+
ProxyCommand darkflare-client -l stdin:stdout -t cdn.example.com -d localhost:22
202+
```
203+
204+
Then simply connect:
205+
```bash
206+
ssh my-remote
207+
```
208+
209+
Or use directly from the command line:
210+
```bash
211+
ssh -o ProxyCommand="darkflare-client -l stdin:stdout -t cdn.example.com -d localhost:22" user@remote-server
212+
```
213+
214+
### Benefits
215+
- No local port binding required
216+
- Works without root/admin privileges
217+
- Bypasses local firewall restrictions
218+
- Integrates seamlessly with SSH and other tools
219+
- Maintains end-to-end encryption
220+
- Traffic still appears as normal HTTPS to observers
221+
222+
223+
## 📖 Command Line Reference
224+
225+
### Client Usage
226+
```
227+
DarkFlare Client - TCP-over-CDN tunnel client component
228+
(c) 2024 Barrett Lyon
229+
230+
Usage:
231+
darkflare-client [options]
232+
233+
Options:
234+
-l Local port or stdin:stdout for ProxyCommand mode
235+
Format: <port> or stdin:stdout
236+
Examples: 2222 or stdin:stdout
237+
238+
-t Target URL for the DarkFlare server
239+
Format: [http|https]://host[:port]
240+
Default port: 443 for HTTPS, 80 for HTTP
241+
242+
-d Destination address to connect to
243+
Format: host:port
244+
Example: localhost:22
245+
246+
-debug Enable detailed debug logging
247+
Shows connection details and errors
248+
249+
-p Proxy URL (http://host:port or socks5://host:port)
250+
Optional SOCKS5 or HTTP proxy for outbound connections
251+
252+
Examples:
253+
Basic port forwarding:
254+
darkflare-client -l 2222 -t cdn.example.com -d localhost:22
255+
256+
SSH ProxyCommand mode:
257+
ssh -o ProxyCommand="darkflare-client -l stdin:stdout -t cdn.example.com -d localhost:22" user@remote
258+
259+
Through a SOCKS5 proxy:
260+
darkflare-client -l 2222 -t cdn.example.com -d localhost:22 -p socks5://proxy:1080
261+
262+
Notes:
263+
- Proxy authentication is supported via URL format user:pass@host
264+
- SOCKS5 variant will resolve hostnames through the proxy
265+
- Debug mode will show proxy connection details and errors
266+
```
267+
268+
### Server Usage
269+
```
270+
DarkFlare Server - TCP-over-CDN tunnel server component
271+
(c) 2024 Barrett Lyon
272+
273+
Usage:
274+
darkflare-server [options]
275+
276+
Options:
277+
-o Listen address for the server
278+
Format: proto://[host]:port
279+
Default: http://0.0.0.0:8080
280+
281+
-allow-direct
282+
Allow direct connections not coming through Cloudflare
283+
Default: false (only allow Cloudflare IPs)
284+
285+
-c Path to TLS certificate file
286+
Default: Auto-generated self-signed cert
287+
288+
-k Path to TLS private key file
289+
Default: Auto-generated with cert
290+
291+
-debug Enable detailed debug logging
292+
Shows connection details and errors
293+
294+
-s Silent mode
295+
Suppresses all non-error output
296+
297+
-redirect Custom URL to redirect unauthorized requests
298+
Default: GitHub project page
299+
300+
-override-dest
301+
Override client destination with server-side setting
302+
Format: host:port
303+
Default: Use client-provided destination
304+
305+
Examples:
306+
Basic setup:
307+
darkflare-server -o http://0.0.0.0:8080
308+
309+
With custom TLS certificates:
310+
darkflare-server -o https://0.0.0.0:443 -c /path/to/cert.pem -k /path/to/key.pem
311+
312+
Debug mode with metrics:
313+
darkflare-server -o http://0.0.0.0:8080 -debug
314+
315+
Notes:
316+
- Server accepts destination from client via X-Requested-With header
317+
- Destination validation is performed for security
318+
- Use with Cloudflare as reverse proxy for best security
319+
```
320+
187321
## ⚠️ Security Considerations
188322

189323
- Always use end-to-end encryption for sensitive traffic

0 commit comments

Comments
 (0)