
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
com.github.bbottema:java-socks-proxy-server
Advanced tools
java-socks-proxy-server is a SOCKS 4/5 server for Java
java-socks-proxy-server is a SOCKS 4/5 server for Java. Includes a JUnit Rule for easy testing with a SOCKS server.
It is a continuation of https://github.com/damico/java-socks-proxy-server.
<dependency>
<groupId>com.github.bbottema</groupId>
<artifactId>java-socks-proxy-server</artifactId>
<version>4.1.2</version>
</dependency>
// start serving clients on port 1234
SocksServer server = new SocksServer(1234).start();
...
server.stop(); // stop serving any new proxy requests
Or you can supply your own ServerSocketFactory
:
// e.g. SSL on port 7132
SocksServer server = new SocksServer(1234, myCustomServerFactory).start();
By default, library uses
NO_AUTH
authentication mode
If you want to authenticate the clients, before proxying, you can set a UsernamePasswordAuthenticator
, library supports standard Username/Password protocol.
new SocksServer(1234)
.setAuthenticator(new UsernamePasswordAuthenticator(false) {
@Override
public boolean validate(String username, String password) {
// validate credentials here, e.g. check your local database
return username.equals("mysecureusername") && password.equals("mysecurepassword");
}
}).start();
Supply a
true
value to constructorUsernamePasswordAuthenticator()
, if you also want to preferNO_AUTH
mode over Username and password.
For use in junit 5 tests (for Junit 4 use a version < 3.0.0):
@RegisterExtension
static SockServerExtension sockServerRule = new SockServerExtension(PROXY_SERVER_PORT);
// or
@RegisterExtension
static SockServerExtension sockServerRule = new SockServerExtension(PROXY_SERVER_PORT, myServerSocketFactory);
And that's it!
v4.1.2 (02-October-2024)
v4.1.0 (15-May-2024) v4.1.1 (duplicate release)
NOTE: the start methods have been marked deprecated. For serving clienst on multiple ports, create a new instance of the server for each port.
v4.0.0 (21-April-2024)
v3.0.0 (22-Januray-2024)
v2.0.0 (26-December-2021)
v1.1.0 (15-April-2021)
v1.0.2 (5-July-2020)
v1.0.1 (6-December-2019)
v1.0.0 (6-December-2019)
Initial release
4-December-2019
Initial upload
FAQs
java-socks-proxy-server is a SOCKS 4/5 server for Java
We found that com.github.bbottema:java-socks-proxy-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.