Initial commit: waste-go skeleton
Ed25519/X25519/ChaCha20-Poly1305 crypto, peer handshake, mesh state, IPC server, relay server, and NAT stub. Builds clean on Go 1.22+. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
7
.vscode/extensions.json
vendored
Normal file
7
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"golang.go",
|
||||
"usernamehw.errorlens",
|
||||
"streetsidesoftware.code-spell-checker"
|
||||
]
|
||||
}
|
||||
55
.vscode/launch.json
vendored
Normal file
55
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "daemon (peer A)",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/cmd/daemon",
|
||||
"args": [
|
||||
"-alias", "peer-a",
|
||||
"-data-dir", "/tmp/waste-a",
|
||||
"-peer-port", "17338",
|
||||
"-ipc-port", "17337"
|
||||
],
|
||||
"env": { "WASTE_LOG": "debug" }
|
||||
},
|
||||
{
|
||||
"name": "daemon (peer B)",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/cmd/daemon",
|
||||
"args": [
|
||||
"-alias", "peer-b",
|
||||
"-data-dir", "/tmp/waste-b",
|
||||
"-peer-port", "17340",
|
||||
"-ipc-port", "17341"
|
||||
],
|
||||
"env": { "WASTE_LOG": "debug" }
|
||||
},
|
||||
{
|
||||
"name": "relay (local)",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/cmd/relay",
|
||||
"args": ["-bind", "127.0.0.1:17339"]
|
||||
},
|
||||
{
|
||||
"name": "daemon (with relay)",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/cmd/daemon",
|
||||
"args": [
|
||||
"-alias", "peer-a",
|
||||
"-data-dir", "/tmp/waste-a",
|
||||
"-peer-port", "17338",
|
||||
"-ipc-port", "17337",
|
||||
"-relay", "127.0.0.1:17339"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
21
.vscode/settings.json
vendored
Normal file
21
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"go.useLanguageServer": true,
|
||||
"go.lintTool": "golangci-lint",
|
||||
"go.lintOnSave": "package",
|
||||
"go.formatTool": "goimports",
|
||||
"go.formatOnSave": true,
|
||||
"editor.formatOnSave": true,
|
||||
"[go]": {
|
||||
"editor.defaultFormatter": "golang.go",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": "explicit"
|
||||
}
|
||||
},
|
||||
"go.testFlags": ["-v", "-race"],
|
||||
"files.watcherExclude": {
|
||||
"**/bin/**": true
|
||||
},
|
||||
"search.exclude": {
|
||||
"**/bin": true
|
||||
}
|
||||
}
|
||||
46
.vscode/tasks.json
vendored
Normal file
46
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build all",
|
||||
"type": "shell",
|
||||
"command": "go build ./...",
|
||||
"group": { "kind": "build", "isDefault": true },
|
||||
"problemMatcher": ["$go"]
|
||||
},
|
||||
{
|
||||
"label": "go mod tidy",
|
||||
"type": "shell",
|
||||
"command": "go mod tidy",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "test all",
|
||||
"type": "shell",
|
||||
"command": "go test -race ./...",
|
||||
"group": "test",
|
||||
"problemMatcher": ["$go"]
|
||||
},
|
||||
{
|
||||
"label": "run relay (local)",
|
||||
"type": "shell",
|
||||
"command": "go run ./cmd/relay -bind 127.0.0.1:17339",
|
||||
"presentation": { "reveal": "always", "panel": "dedicated", "group": "runtime" },
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "run daemon (peer A)",
|
||||
"type": "shell",
|
||||
"command": "go run ./cmd/daemon -alias peer-a -data-dir /tmp/waste-a -peer-port 17338 -ipc-port 17337",
|
||||
"presentation": { "reveal": "always", "panel": "dedicated", "group": "runtime" },
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "run daemon (peer B)",
|
||||
"type": "shell",
|
||||
"command": "go run ./cmd/daemon -alias peer-b -data-dir /tmp/waste-b -peer-port 17340 -ipc-port 17341",
|
||||
"presentation": { "reveal": "always", "panel": "dedicated", "group": "runtime" },
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user