feat: comment cleanup

This commit is contained in:
samosvalishe committed 2026-08-16 23:13:01 +03:00
1 parent 6b14a95434
commit 648c55415b
112 files changed
+655 -2161

No files matched your search

+3 -9
View File
@@ -6,19 +6,13 @@ import (
"github.com/samosvalishe/free-turn-proxy/internal/netctl"
)
// Protector is implemented by the host to keep the client's own sockets out of
// a VPN tunnel it is feeding. On Android that is VpnService.protect(fd); on
// other tun-based hosts the equivalent. Without it the client's TURN / VK API /
// DNS traffic is routed back into the tunnel and the connection deadlocks.
// Protector реализуется хостом для исключения сокетов клиента из VPN-туннеля (VpnService.protect).
// Без этого TURN / VK API / DNS трафик заворачивается обратно в туннель.
type Protector interface {
// Protect is invoked once for every outbound socket the client opens, with
// the socket's raw file descriptor, before it connects.
Protect(fd int) bool
}
// SetProtect installs the host socket protector. Pass nil to clear it (the
// default is a no-op, so desktop builds are unaffected). May be called before
// or after Start; it is read at dial time.
// SetProtect устанавливает обработчик защиты сокетов хоста (nil - no-op).
func SetProtect(p Protector) {
if p == nil {
netctl.SetControl(nil)