ilusm.dev

anon

Anonymity and privacy - Tor, VPN, proxy chains, MAC spoofing, traffic shaping, I2P, and burner identities.

Load with: use anon

What this module does

anon provides programmatic control over anonymity infrastructure. Start and stop Tor, connect to VPNs, build proxy chains, spoof your MAC address, randomise browser fingerprints and hostnames, shape traffic with padding and delays, check for IP/DNS/WebRTC leaks, and create burner email addresses and phone numbers.

Most functions call native host APIs (__anon_*) that require the relevant tools to be installed and available on the host system.

Functions

Tor

torst(socks_port)

Starts a Tor process listening on the given SOCKS port. Returns a handle.

torst1(h)

Stops the Tor process associated with handle h.

torre(url, method, data, socks_proxy)

Routes a request through Tor via a SOCKS proxy on 127.0.0.1:{socks_proxy}.

torne(h)

Requests a new Tor identity (new circuit and exit node).

torci(h)

Returns the current Tor circuit list.

torex(ip)

Checks whether the given IP address is a known Tor exit node by fetching the Tor Project's exit address list.

torbr()

Fetches obfs4 bridge addresses from bridges.torproject.org. Returns a list of bridge lines, or an empty list on failure.

VPN

vpnco(config_file, auth_user, auth_pass)

Connects to a VPN using the given config file and credentials. Returns a connection handle.

vpndi(h)

Disconnects the VPN associated with handle h.

vpnst(h)

Returns the status of the VPN connection.

vpnip(h)

Returns the current external IP address as seen through the VPN.

vpndn(h)

Checks for DNS leaks by querying dnsleaktest.com through the VPN. Returns the response or nil on failure.

vpnki(iface)

Enables a kill switch on the given network interface - blocks all non-VPN traffic.

vpnki1()

Disables the kill switch.

Proxy chains

anpro(proxies)

Creates a proxy chain from a list of proxy objects. Each proxy needs type, host, port, and optionally auth fields.

anpro1(chain)

Rotates to the next proxy in the chain.

anpro2(chain)

Appends a Tor SOCKS5 proxy (127.0.0.1:9050) as the final hop in the chain.

Mixnets

mixny()

Connects to the Nym mixnet. Returns a handle.

mixny1(h, recipient, message)

Sends a message through the Nym mixnet to a recipient address.

mixny2(h)

Receives a message from the Nym mixnet.

mixlo()

Connects to the Lokinet anonymising network.

mixlo1(lns_name)

Resolves a Lokinet Name System (LNS) address.

MAC spoofing

macsp(iface, new_mac)

Sets the MAC address of the given network interface to new_mac. Requires root on most systems.

macra(iface)

Generates a random MAC address (6 random bytes as colon-separated hex) and applies it to the interface via macsp.

Identity randomisation

hostn()

Generates a random hostname in the format {adjective}-{noun}-{number} using hardcoded word lists.

anont(tz)

Sets the system timezone to the given value.

anonl(locale)

Sets the system locale.

anonu()

Returns a random user-agent string from a hardcoded list of Chrome user-agents (Windows, macOS, Linux).

Traffic shaping

anonp(h, min_bytes, max_bytes)

Adds random padding to traffic to obscure payload sizes. Padding is between min_bytes and max_bytes.

anond(h, min_ms, max_ms)

Adds random delays to traffic to obscure timing patterns.

Leak detection

anonc()

Returns your current external IP address by querying checkip.amazonaws.com. Returns "unknown" on failure.

anonc1()

Checks for DNS leaks by querying dnsleaktest.com. Returns the response or nil.

anonw()

Checks for WebRTC IP leaks. Calls __anon_webrtc_leak_check().

Multi-hop routing

anonm(hops)

Creates a multi-hop VPN chain by connecting to each VPN server in the list in sequence. Each hop needs config, user, and pass fields.

I2P

i2pst()

Starts the I2P router. Returns a handle.

i2pst1(h)

Stops the I2P router.

i2pre(b32_address)

Resolves an I2P .b32.i2p address to a destination.

Isolation check and burner identities

anoni()

Checks whether the process is running in an isolated environment (e.g. Whonix or Qubes).

anonb()

Creates a temporary email address.

anonb1()

Creates a temporary phone number.