resolve-ptr

command
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: CC0-1.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

SOCKS Proxy DNS Reverse Lookup Example

A simple CLI example demonstrating how to use socksgo to perform reverse DNS lookups (IP address → hostname) through a SOCKS proxy using Tor's SOCKS extension.

Usage

go run . [options]
Options
  • -proxy: SOCKS proxy URL with ?tor option (default: socks5://127.0.0.1:1080?tor)
  • -ip: IP address to reverse lookup (default: 8.8.8.8)
  • -timeout: Operation timeout (default: 30s)

Examples

Basic Reverse Lookup
# Reverse lookup for Google's DNS server
go run . -proxy socks5://localhost:1080?tor -ip 8.8.8.8

# Reverse lookup for Cloudflare's DNS server
go run . -proxy socks5://localhost:1080?tor -ip 1.1.1.1
With Authentication
# Use SOCKS proxy with authentication
go run . -proxy socks5://user:pass@localhost:1080?tor -ip 8.8.8.8
Tor Proxy
# Reverse lookup through Tor daemon SOCKS proxy (default port 9050)
go run . -proxy socks5://localhost:9050?tor -ip 8.8.8.8

Notes

The ?tor URL option is required to enable Tor's SOCKS extension for DNS resolution. Without it, the LookupAddr method will return an error.

Not all IP addresses have reverse DNS records. Some addresses may return an empty list of hostnames.

Documentation

Overview

nolint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL