Initial commit: minimal relay server and CLI structure

Relay pairs connections by room name and pipes bytes between them,
with no password/PAKE handshake at the relay layer — codephrase-based
encryption is left to the client side of the transfer.
This commit is contained in:
2026-07-20 10:13:37 +08:00
commit 95726d9e45
15 changed files with 2501 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
"github.com/tzgyn/share/src/cli"
"github.com/tzgyn/share/src/utils"
)
func main() {
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
go func() {
if err := cli.Run(); err != nil {
fmt.Println(err)
os.Exit(1)
}
utils.RemoveMarkedFiles()
os.Exit(0)
}()
<-sigs
utils.RemoveMarkedFiles()
os.Exit(0)
}