@axlotl-lab/navigrator
Version:
A powerful local domain manager for development environments. Navigrator helps you manage local domains and SSL certificates with a simple web interface.
73 lines • 1.7 kB
TypeScript
export interface ProxyConfig {
domain: string;
target: string;
isRunning: boolean;
certPath?: string;
keyPath?: string;
port?: number;
}
export declare class ProxyService {
private proxies;
private sniServer;
private configFilePath;
private sniServerPort;
private sniCertificates;
constructor();
/**
* Load saved proxy configurations
*/
private loadProxies;
/**
* Save current proxy configurations
*/
private saveProxies;
/**
* Get all proxy configurations
*/
getProxies(): ProxyConfig[];
/**
* Add a new proxy configuration
*/
addProxy(config: ProxyConfig): ProxyConfig;
/**
* Remove a proxy configuration
*/
removeProxy(domain: string): boolean;
/**
* Initialize or update the SNI server
*/
private initOrUpdateSNIServer;
/**
* Create a secure context for SNI server
*/
private createSecureContext;
/**
* Stop the SNI server
*/
private stopSNIServer;
/**
* Handle a proxy request
*/
private handleProxyRequest;
/**
* Start a proxy server for a domain
*/
startProxy(domain: string, certPath: string, keyPath: string): boolean;
/**
* Prepare headers for the proxy request
*/
private prepareProxyHeaders;
/**
* Stop a running proxy server
*/
stopProxy(domain: string): boolean;
/**
* Stop all running proxy servers
*/
stopAllProxies(): void;
/**
* Update a proxy configuration
*/
updateProxy(domain: string, newConfig: Partial<ProxyConfig>): boolean;
}
//# sourceMappingURL=proxy-service.d.ts.map