From 76ae7c28ea6224b2c919122d5dc71bcc00a0ecaa Mon Sep 17 00:00:00 2001 From: yum Date: Mon, 3 Jul 2023 18:44:43 -0700 Subject: Begin work on proxy server Create a simple server with 3 endpoints: * /create_session: Create a session and return its identifier. * /set_transcript: Update a session's transcript. * /get_transcript: Fetch a session's transcript. Right now the session ID provides authentication *and* authorization. There is no public/private ID so you have to trust whoever you share your ID with. IDs are long and generated by the server, so it should be somewhat secure against low-effort hacking. Other updates: * Drop whisper_requirements.txt - no longer needed. * Vendor curl to make it easier to interact with the server. TODO: * Fuzz test the server. --- BrowserSource/Proxy/Makefile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 BrowserSource/Proxy/Makefile (limited to 'BrowserSource/Proxy/Makefile') diff --git a/BrowserSource/Proxy/Makefile b/BrowserSource/Proxy/Makefile new file mode 100644 index 0000000..81eb814 --- /dev/null +++ b/BrowserSource/Proxy/Makefile @@ -0,0 +1,37 @@ +CC := clang++ + +MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) + +DEFINES := +CFLAGS := -Wall -Wextra -std=c++20 $(DEFINES) -I$(MAKEFILE_DIR)/fmt/include +LDFLAGS := -L$(MAKEFILE_DIR)/fmt/build -lfmt -static + +SRCS := $(wildcard *.cpp) + +HDRS := $(wildcard *.h) + +OBJS := $(SRCS:.cpp=.o) + +EXE := server + +.PHONY: all +all: $(EXE) + +$(EXE): $(OBJS) + $(CC) -o $@ $^ $(LDFLAGS) + +# Hack: any header change causes a full recompilation of everything. +%.o: %.cpp $(HDRS) + $(CC) $(CFLAGS) -c -o $@ $< + +.PHONY: clean +clean: + @rm -f $(OBJS) $(EXE) + +.PHONY: debug +debug: + @echo "CC: $(CC)" + @echo "MAKEFILE_DIR: $(MAKEFILE_DIR)" + @echo "STT_TOP: $(STT_TOP)" + @echo "OBJS: $(OBJS)" + -- cgit v1.2.3