Documentation
¶
Overview ¶
Package nym sets up and runs the official nym-socks5-client release binary.
zecmix does not reimplement the mixnet. Nym's own client does the Sphinx packet construction, cover traffic, Poisson delays and gateway handling, and exposes a SOCKS5 port that zecmix talks to.
Index ¶
- Constants
- func ConfigPath(id string) string
- func Described(api string) (map[int]DescribedNode, error)
- func FindBinary(explicit string) (string, error)
- func Home() string
- func Init(binary, id, provider string, port int, anonymous bool, gateway string) (string, error)
- func LogFile(id string) string
- func PatchConfig(id string) (bool, error)
- func PatchConfigText(text string) (bool, string)
- func RunningPID(id string) int
- func StateDir() string
- func Stop(id string) bool
- type DescribedNode
- type ExitProvider
- type Status
Constants ¶
const ( NymAPI = "https://validator.nymtech.net/api" DefaultID = "zecmix" // DefaultPort is 1080, Nym's own default for the SOCKS5 client. DefaultPort = 1080 )
Variables ¶
This section is empty.
Functions ¶
func Described ¶
func Described(api string) (map[int]DescribedNode, error)
Described returns every node the nym-api describes, keyed by node id.
func FindBinary ¶
FindBinary locates nym-socks5-client: explicit path, $ZECMIX_NYM_SOCKS5, then $PATH.
func Init ¶
Init runs `nym-socks5-client init` with reply SURBs on by default (the exit then never learns this client's mixnet address).
func PatchConfig ¶
PatchConfig works around nym-socks5-client 1.1.86 (v2026.19) writing a config it can't read: the template omits credential_requests_database while the loader requires it, so `run` fails right after `init` with "missing field `credential_requests_database`". Adds the default path.
func PatchConfigText ¶
PatchConfigText is PatchConfig on a string (for tests).
func RunningPID ¶
RunningPID returns the pid of the client started by zecmix, or 0.
Types ¶
type DescribedNode ¶
type DescribedNode struct {
NodeID int `json:"node_id"`
Description struct {
Host struct {
IPs []string `json:"ip_address"`
} `json:"host_information"`
NetworkRequester *struct {
Address string `json:"address"`
UsesExitPolicy bool `json:"uses_exit_policy"`
} `json:"network_requester"`
Aux struct {
Location string `json:"location"`
} `json:"auxiliary_details"`
Build struct {
Version string `json:"build_version"`
} `json:"build_information"`
Roles struct {
ExitNR bool `json:"exit_nr"`
} `json:"declared_role"`
} `json:"description"`
}
DescribedNode is the subset of /v1/nym-nodes/described we use.
func NodeByIP ¶
func NodeByIP(api, ip string) (*DescribedNode, error)
NodeByIP finds which Nym node announces ip (used to show that a server saw a Nym exit gateway's address).
type ExitProvider ¶
type ExitProvider struct {
NodeID int `json:"node_id"`
Country string `json:"country"`
Performance float64 `json:"performance"`
Version string `json:"version"`
Address string `json:"address"`
IPs []string `json:"ips"`
}
ExitProvider is a network requester on an active exit gateway.
func ListExitProviders ¶
func ListExitProviders(api string, minPerf float64) ([]ExitProvider, error)
ListExitProviders asks the nym-api for network requesters on currently active exit gateways that enforce the exit policy.
This queries the public nym-api directly (not through the mixnet), exactly as nym-socks5-client itself does to fetch the network topology. It reveals that you use Nym, nothing about your wallet.
func PickProvider ¶
func PickProvider(ps []ExitProvider) (ExitProvider, error)
PickProvider chooses at random (spreads load, keeps the choice unpredictable).
type Status ¶
type Status struct {
ID string `json:"id"`
PID int `json:"pid"`
SOCKS5 string `json:"socks5"`
Provider string `json:"provider"`
AnonymousReplies bool `json:"anonymous_replies"`
ClientAddress string `json:"client_address"`
Gateway string `json:"gateway"`
Log string `json:"log"`
}
Status of a configured client.