Documentation
¶
Index ¶
Constants ¶
View Source
const Rendezvous = "tunsgo-peers-0009"
Variables ¶
This section is empty.
Functions ¶
func LoadOrCreateIdentity ¶
Types ¶
type P2PServer ¶
type P2PServer struct {
// contains filtered or unexported fields
}
func (*P2PServer) GinHandler ¶
GinHandler godoc
@Summary Universal P2P Proxy Tunnel
@Description Proxies any HTTP request (GET, POST, PUT, DELETE, etc.) through the P2P network.
@Description Uses a smart routing logic: local fetch if the host is allowed locally,
@Description otherwise tunnels the raw traffic to a candidate P2P node.
@Tags Proxy
@Accept */*
@Produce */*
@Param url path string true "Full target URL"
@Success 200 {string} string "Proxied response"
@Failure 429 {json} string "Remote node slots busy"
@Failure 502 {json} string "No proxy nodes available"
@Router /proxy/{url} [get]
@Router /proxy/{url} [post]
@Router /proxy/{url} [put]
@Router /proxy/{url} [delete]
type P2PStatus ¶
type P2PStatus struct {
PeerID string `json:"peer_id"`
ListenAddrs []string `json:"listen_addrs"`
TotalConns int `json:"total_conns"`
TunsPeersCount int `json:"tuns_peers_count"`
KnownDomains map[string][]string `json:"known_domains"`
Peers []*PeerDetail `json:"peers_list"`
ConnectedPeers []*PeerDetail `json:"connected_peers_list"`
OurPeers []*models.PeerInfo `json:"our_peers_list"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.