UNPKG

@datadog/mobile-react-native

Version:

A client-side React Native module to interact with Datadog

48 lines 1.1 kB
/** * Proxy server configuration. */ class ProxyConfiguration { constructor( /** * Proxy type. */ type, /** * Proxy address. Can be either in the IP address format, ex. "1.1.1.1", or hostname, ex. "example.com". */ address, /** * Proxy port. */ port, /** * Username for Basic authentication scheme. * * Note: "SOCKS + authentication" scheme is not supported. */ username, /** * Password for Basic authentication scheme. */ password) { this.type = type; this.address = address; this.port = port; if (username && password) { if (type === ProxyType.SOCKS) { console.warn("SOCKS proxy configuration doesn't support Basic authentication."); } else { this.username = username; this.password = password; } } } } var ProxyType = /*#__PURE__*/function (ProxyType) { ProxyType["HTTP"] = "http"; ProxyType["HTTPS"] = "https"; ProxyType["SOCKS"] = "socks"; return ProxyType; }(ProxyType || {}); export { ProxyConfiguration, ProxyType }; //# sourceMappingURL=ProxyConfiguration.js.map