![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.
Dealing with SOCKS and HTTP proxies is a pain. EM-Socksify provides a simple ship to setup and negotiation a SOCKS / HTTP connection for any EventMachine protocol.
class Handler < EM::Connection
include EM::Socksify
def connection_completed
socksify('google.ca', 80) do
send_data "GET / HTTP/1.1\r\nConnection:close\r\nHost: google.ca\r\n\r\n"
end
end
def receive_data(data)
p data
end
end
EM.run do
EventMachine.connect SOCKS_HOST, SOCKS_PORT, Handler
end
What's happening here? First, we open a raw TCP connection to the SOCKS proxy. Once the TCP connection is established, EventMachine calls the connection_completed method in our handler, at which point we call the helper method (socksify) with the actual destination and host and port (address that we actually want to get to), and the module does the rest.
socksify temporarily intercepts your receive_data callbacks, negotiates the SOCKS connection (version, authentication, etc), and then once all of that is done, returns control back to your code.
For SOCKS proxies which require authentication, use:
socksify(destination_host, destination_port, username, password, version)
class Handler < EM::Connection
include EM::Connectify
def connection_completed
connectify('www.google.ca', 443) do
start_tls
send_data "GET / HTTP/1.1\r\nConnection:close\r\nHost: www.google.ca\r\n\r\n"
end
end
def receive_data(data)
p data
end
end
EM.run do
EventMachine.connect PROXY_HOST, PROXY_PORT, Handler
end
For CONNECT proxies which require authentication, use:
connectify(destination_host, destination_port, username, password)
(The MIT License)
FAQs
Unknown package
We found that em-socksify demonstrated a healthy version release cadence and project activity because the last version was released less than 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.