rename Fence to Greywall as GreyHaven sandboxing component
Rebrand the project from Fence to Greywall, the sandboxing layer of the GreyHaven platform. This updates: - Go module path to gitea.app.monadical.io/monadical/greywall - Binary name, CLI help text, and all usage examples - Config paths (~/.config/greywall/greywall.json), env vars (GREYWALL_*) - Log prefixes ([greywall:*]), temp file prefixes (greywall-*) - All documentation, scripts, CI workflows, and example files - README rewritten with GreyHaven branding and Fence attribution Directory/file renames: cmd/fence → cmd/greywall, pkg/fence → pkg/greywall, docs/why-fence.md → docs/why-greywall.md, example JSON files, and banner.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Dev Server + Redis Demo
|
||||
|
||||
This demo shows how fence controls network access: allowing specific external domains while blocking (or allowing) localhost connections.
|
||||
This demo shows how greywall controls network access: allowing specific external domains while blocking (or allowing) localhost connections.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -21,7 +21,7 @@ npm install
|
||||
This shows that requests to Redis (local service) works, but external requests are blocked.
|
||||
|
||||
```bash
|
||||
fence -p 3000 --settings fence-external-blocked.json npm start
|
||||
greywall -p 3000 --settings greywall-external-blocked.json npm start
|
||||
```
|
||||
|
||||
Test it:
|
||||
@@ -39,7 +39,7 @@ curl http://localhost:3000/api/external
|
||||
This shows the opposite: whitelisted external domains work, but Redis (localhost) is blocked.
|
||||
|
||||
```bash
|
||||
fence -p 3000 --settings fence-external-only.json npm start
|
||||
greywall -p 3000 --settings greywall-external-only.json npm start
|
||||
```
|
||||
|
||||
You will immediately notice that Redis connection is blocked on app startup:
|
||||
@@ -62,8 +62,8 @@ curl http://localhost:3000/api/users
|
||||
|
||||
| Config | Redis (localhost) | External (httpbin.org) |
|
||||
|--------|-------------------|------------------------|
|
||||
| `fence-external-blocked.json` | ✓ Allowed | ✗ Blocked |
|
||||
| `fence-external-only.json` | ✗ Blocked | ✓ Allowed |
|
||||
| `greywall-external-blocked.json` | ✓ Allowed | ✗ Blocked |
|
||||
| `greywall-external-only.json` | ✗ Blocked | ✓ Allowed |
|
||||
|
||||
## Key Settings
|
||||
|
||||
@@ -75,7 +75,7 @@ curl http://localhost:3000/api/users
|
||||
|
||||
## Note: Node.js Proxy Support
|
||||
|
||||
Node.js's native `http`/`https` modules don't respect proxy environment variables. This demo uses [`undici`](https://github.com/nodejs/undici) with `ProxyAgent` to route requests through fence's proxy:
|
||||
Node.js's native `http`/`https` modules don't respect proxy environment variables. This demo uses [`undici`](https://github.com/nodejs/undici) with `ProxyAgent` to route requests through greywall's proxy:
|
||||
|
||||
```javascript
|
||||
import { ProxyAgent, fetch } from "undici";
|
||||
@@ -86,4 +86,4 @@ const response = await fetch(url, {
|
||||
});
|
||||
```
|
||||
|
||||
Without this, external HTTP requests would fail with connection errors (the sandbox blocks them) rather than going through fence's proxy.
|
||||
Without this, external HTTP requests would fail with connection errors (the sandbox blocks them) rather than going through greywall's proxy.
|
||||
|
||||
Reference in New Issue
Block a user