dns

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoopbackGen

type LoopbackGen struct {
	// contains filtered or unexported fields
}

LoopbackGen manages the generation of loopback IP addresses with improved robustness

func NewLoopbackGen

func NewLoopbackGen() *LoopbackGen

NewLoopbackGen creates and initializes a new LoopbackGen instance

func (*LoopbackGen) GetNextIP

func (g *LoopbackGen) GetNextIP() net.IP

GetNextIP returns the next loopback IP address with improved safety

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements a simple DNS server for hijacking domain lookups

func NewServer

func NewServer(ip string, port int, log logger.Logger) *Server

NewServer creates a new DNS server

func (*Server) GetDomainForIP

func (s *Server) GetDomainForIP(ip string) (string, bool)

GetDomainForIP retrieves the original domain for a given IP address

func (*Server) Start

func (s *Server) Start() error

Start starts the DNS server

func (*Server) Stop

func (s *Server) Stop()

Stop stops the DNS server

Jump to

Keyboard shortcuts

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