mirror of
https://github.com/quarkslab/proxyblob
synced 2026-06-08 16:52:59 +00:00
5b21bc7cda
Compile the agent to WebAssembly for deployment in JS runtimes (Bun, Node.js, or any runtime implementing the TCPDial/UDPListen interface). - Split network and UDP code with js/native build tags - Extract UDP relay into a platform-agnostic shared layer - Expose runtime-agnostic TCPDial and UDPListen JS hooks - Add azure-sdk-for-go fork as submodule for WASM-compatible mmf fallback - Bump aznet dependency - Document WASM build and JS interface in README
21 lines
455 B
Makefile
21 lines
455 B
Makefile
.PHONY: all clean proxy agent wasm
|
|
|
|
ifndef TOKEN
|
|
CONN_STRING ?=
|
|
else
|
|
CONN_STRING = -X 'main.ConnString=$(TOKEN)'
|
|
endif
|
|
|
|
all: clean proxy agent wasm
|
|
|
|
proxy:
|
|
go build -ldflags="-s -w" -trimpath -o proxy cmd/proxy/main.go
|
|
|
|
agent:
|
|
go build -ldflags="-s -w $(CONN_STRING)" -trimpath -o agent cmd/agent/main.go
|
|
|
|
wasm:
|
|
GOOS=js GOARCH=wasm go build -ldflags="-s -w $(CONN_STRING)" -trimpath -o agent.wasm cmd/agent/main.go
|
|
|
|
clean:
|
|
rm -f proxy agent agent.wasm
|