mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-28 11:17:33 +00:00

Change-Id: I07eebc68cb48aa956b9eb8e67b06375df6458a48 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
34 lines
489 B
Go
34 lines
489 B
Go
// The lopower server is a "Little Opinionated Proxy Over
|
|
// Wireguard-Encrypted Route". It bridges a static WireGuard
|
|
// client into a Tailscale network.
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
"log"
|
|
"os"
|
|
|
|
"tailscale.com/tsnet"
|
|
)
|
|
|
|
func main() {
|
|
flag.Parse()
|
|
|
|
hostname, err := os.Hostname()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
ts := &tsnet.Server{
|
|
Hostname: hostname,
|
|
UserLogf: log.Printf,
|
|
Ephemeral: false,
|
|
}
|
|
|
|
if err := ts.Start(); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
select {}
|
|
}
|