socks-proxy-agent
Advanced tools
Comparing version 8.0.2 to 8.0.3
@@ -97,2 +97,3 @@ "use strict"; | ||
this.timeout = opts?.timeout ?? null; | ||
this.socketOptions = opts?.socketOptions ?? null; | ||
} | ||
@@ -132,2 +133,5 @@ /** | ||
timeout: timeout ?? undefined, | ||
// @ts-expect-error the type supplied by socks for socket_options is wider | ||
// than necessary since socks will always override the host and port | ||
socket_options: this.socketOptions ?? undefined, | ||
}; | ||
@@ -134,0 +138,0 @@ const cleanup = (tlsSocket) => { |
@@ -9,3 +9,6 @@ /// <reference types="node" /> | ||
import { URL } from 'url'; | ||
export type SocksProxyAgentOptions = Omit<SocksProxy, 'ipaddress' | 'host' | 'port' | 'type' | 'userId' | 'password'> & http.AgentOptions; | ||
type SocksSocketOptions = Omit<net.TcpNetConnectOpts, 'port' | 'host'>; | ||
export type SocksProxyAgentOptions = Omit<SocksProxy, 'ipaddress' | 'host' | 'port' | 'type' | 'userId' | 'password'> & { | ||
socketOptions?: SocksSocketOptions; | ||
} & http.AgentOptions; | ||
export declare class SocksProxyAgent extends Agent { | ||
@@ -16,2 +19,3 @@ static protocols: readonly ["socks", "socks4", "socks4a", "socks5", "socks5h"]; | ||
timeout: number | null; | ||
socketOptions: SocksSocketOptions | null; | ||
constructor(uri: string | URL, opts?: SocksProxyAgentOptions); | ||
@@ -24,2 +28,3 @@ /** | ||
} | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -97,2 +97,3 @@ "use strict"; | ||
this.timeout = opts?.timeout ?? null; | ||
this.socketOptions = opts?.socketOptions ?? null; | ||
} | ||
@@ -132,2 +133,5 @@ /** | ||
timeout: timeout ?? undefined, | ||
// @ts-expect-error the type supplied by socks for socket_options is wider | ||
// than necessary since socks will always override the host and port | ||
socket_options: this.socketOptions ?? undefined, | ||
}; | ||
@@ -134,0 +138,0 @@ const cleanup = (tlsSocket) => { |
{ | ||
"name": "socks-proxy-agent", | ||
"version": "8.0.2", | ||
"version": "8.0.3", | ||
"description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS", | ||
@@ -110,3 +110,3 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"agent-base": "^7.0.2", | ||
"agent-base": "^7.1.1", | ||
"debug": "^4.3.4", | ||
@@ -113,0 +113,0 @@ "socks": "^2.7.1" |
@@ -50,28 +50,2 @@ socks-proxy-agent | ||
}); | ||
``` | ||
License | ||
------- | ||
(The MIT License) | ||
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> | ||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
'Software'), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
25074
8
396
50
Updatedagent-base@^7.1.1