router

package
v0.0.0-...-473c859 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDNSDiscoveryHandler

func GetDNSDiscoveryHandler(store *cache.Cache, domain string, redirectPort string) gin.HandlerFunc

TODO Implement a proper vhost manager instead of using a middleware

func Setup

func Setup(r *gin.Engine, geo *service.Geo)

func SetupTemplate

func SetupTemplate(r *gin.Engine)

Types

type DNSJSONResponse

type DNSJSONResponse struct {
	DNS dnsData `json:"dns"`
}

type GeoResponse

type GeoResponse struct {
	Country         string  `json:"country,omitempty"`
	CountryCode     string  `json:"country_code,omitempty"`
	City            string  `json:"city,omitempty"`
	Latitude        float64 `json:"latitude,omitempty"`
	Longitude       float64 `json:"longitude,omitempty"`
	PostalCode      string  `json:"postal_code,omitempty"`
	TimeZone        string  `json:"time_zone,omitempty"`
	ASN             uint    `json:"asn,omitempty"`
	ASNOrganization string  `json:"asn_organization,omitempty"`
}

type JSONResponse

type JSONResponse struct {
	IP         string      `json:"ip"`
	IPVersion  byte        `json:"ip_version"`
	ClientPort string      `json:"client_port"`
	Host       string      `json:"host"`
	Headers    http.Header `json:"headers"`
	GeoResponse
}

type JSONScanResponse

type JSONScanResponse struct {
	IP        string `json:"ip"`
	Port      int    `json:"port"`
	Reachable bool   `json:"reachable"`
	Reason    string `json:"reason"`
}

Jump to

Keyboard shortcuts

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