Switch from gRPC localhost to socket

This commit changes the way CLI and grpc-gateway communicates with the
gRPC backend to socket, instead of localhost. Unauthenticated access now
goes on the socket, while the network interface will require API key (in
the future).
This commit is contained in:
Kristoffer Dalby committed 2021-10-30 14:08:16 +00:00
1 parent 72fd2a2780
commit 6aacada852
6 files changed
+50 -134

No files matched your search

-8
View File
@@ -156,11 +156,3 @@ func tailNodesToString(nodes []*tailcfg.Node) string {
func tailMapResponseToString(resp tailcfg.MapResponse) string {
return fmt.Sprintf("{ Node: %s, Peers: %s }", resp.Node.Name, tailNodesToString(resp.Peers))
}
func IsLocalhost(host string) bool {
if strings.Contains(host, LOCALHOST_V4) || strings.Contains(host, LOCALHOST_V6) {
return true
}
return false
}