Files
share/main.go
T
TZGyn 95726d9e45 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.
2026-07-20 10:13:37 +08:00

30 lines
419 B
Go

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)
}