Pinggy SDK - v0.2.4
    Preparing search index...

    Type Alias PinggyOptions

    Configuration options for creating Pinggy tunnels.

    const options: PinggyOptions = {
    forwarding: "localhost:3000",
    tunnelType: ["http"],
    debug: true,
    basicAuth: [{ username: "user", password: "pass" }]
    };
    type PinggyOptions = {
        allowPreflight?: boolean;
        autoReconnect?: boolean;
        basicAuth?: BasicAuthItem[];
        bearerTokenAuth?: string[];
        force?: boolean;
        forwarding?: string | ForwardingEntry[];
        headerModification?: HeaderModification[];
        httpsOnly?: boolean;
        ipWhitelist?: string[];
        maxReconnectAttempts?: number;
        optional?: Optional;
        originalRequestUrl?: boolean;
        reconnectInterval?: number;
        reverseProxy?: boolean;
        serverAddress?: string;
        token?: string;
        tunnelType?: TunnelType[];
        webDebugger?: string;
        xForwardedFor?: boolean;
    }
    Index

    Properties

    allowPreflight?: boolean

    Allow CORS preflight (OPTIONS) requests.

    false
    
    autoReconnect?: boolean

    Auto-reconnect configuration for the tunnel.

    false
    
    basicAuth?: BasicAuthItem[]

    Basic authentication credentials (username: password).

    [{ username: "user", password: "pass" }]
    
    bearerTokenAuth?: string[]

    List of bearer authentication tokens.

    ["token123", "token456"]
    
    force?: boolean

    Force specific tunnel settings or bypass certain restrictions.

    false
    
    forwarding?: string | ForwardingEntry[]

    Forwarding can either be a string, or a list of objects. But it is required - at least empty string or empty list.

    "http://localhost:3000" or [{ address: "http://localhost:3000" }, { listenAddress: "0.tcp.pinggy.io:12345", address: "http://localhost:4000" }]
    
    headerModification?: HeaderModification[]

    List of header modification rules.

    httpsOnly?: boolean

    Only allow HTTPS connections to the tunnel.

    false
    
    ipWhitelist?: string[]

    List of whitelisted IP addresses that can access the tunnel.

    ["192.168.1.1", "10.0.0.1"]
    
    maxReconnectAttempts?: number

    Maximum number of reconnection attempts before giving up.

    20
    
    optional?: Optional

    Advanced SSL and additional configuration options.

    originalRequestUrl?: boolean

    Forward the full request URL to the backend service.

    false
    
    reconnectInterval?: number

    Time interval (in seconds) between reconnection attempts.

    5
    
    reverseProxy?: boolean

    Disable reverse proxy behavior.

    false
    
    serverAddress?: string

    Server address to connect to.

    "connect.pinggy.io"
    
    token?: string

    Authentication token for the tunnel.

    "tk_123abc456def"
    
    tunnelType?: TunnelType[]

    Tunnel protocol types. (Required) One or more of: "http", "tcp", "tls", "udp", "tlstcp"

    webDebugger?: string

    Local address for web debugger.

    "localhost:8080"
    
    xForwardedFor?: boolean

    Enable X-Forwarded-For header to pass client IP information.

    false