![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
persistent-tunnel
Advanced tools
HTTP Agent for tunneling proxies with persistent sockets
This tunneling agent combines the latest http.Agent with a custom createConnection
function
that returns the socket of an established tunnel.
Inspired from
var tunnel = require('persistent-tunnel');
var tunnelingAgent = new tunnel.Agent({
proxy: {
host: 'localhost',
port: 3128
}
});
var req = http.request({
host: 'example.com',
port: 80,
agent: tunnelingAgent
});
var tunnel = require('persistent-tunnel');
var tunnelingAgent = new tunnel.Agent({
keepAlive: true // create persistent sockets over tunnel
proxy: {
host: 'localhost',
port: 3128
},
});
var req = http.request({
host: 'example.com',
port: 80,
agent: tunnelingAgent
});
var tunnel = require('persistent-tunnel');
var tunnelingAgent = new tunnel.Agent({
keepAlive: true,
proxy: {
host: 'localhost',
port: 3128
timeout: 2000 // tunnel sockets close after 2s of inactivity
},
});
var req = http.request({
host: 'example.com',
port: 80,
agent: tunnelingAgent
});
keepAlive
settingWhen keepAlive
is set to true
, socket pooling / reuse
is enabled by the HTTP Agent. In addition to managing the pool,
the HTTP Agent calls setKeepAlive()
on each pooled socket so
that TCP KeepAlive packets are sent over the established connection
in small intervals. Any intermediate TCP Load Balancers / Proxies
along the tunnel connection should detect the TCP KeepAlive packets
and keep the connection alive.
timeout
settingWhen timeout
is set, the connection will get severed if no data has
been transfered over the socket for the specified time. TCP KeepAlive
packets do not count as data. The timeout
setting is useful for making sure
that idle sockets will eventually get destroy()
'ed and release their
resources.
If no timeout
value is set, the pooled tunneling sockets will be kept alive forever.
In any case, if a tunnel connection gets dropped for any reason, the underlying socket will emit an error that [will result in it being removed from the HTTP Agent pool (and its resources released, too).
If you're having any problem, please raise an issue on GitHub and the Balena team will be happy to help.
Licensed under the MIT license.
2.2.1 - 2021-07-01
FAQs
HTTP Agent for tunneling proxies with persistent sockets
The npm package persistent-tunnel receives a total of 209 weekly downloads. As such, persistent-tunnel popularity was classified as not popular.
We found that persistent-tunnel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.