Skip to content

0xshaft03/java-socks-proxy-server

 
 

Repository files navigation

APACHE v2 License Latest Release Javadocs Codacy

java-socks-proxy-server

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>2.0.0</version>
</dependency>

Usage:

SocksServer socksServer = new SocksServer();

socksServer.start(100); // start serving clients on port 100
socksServer.start(200); // start serving clients on port 200
socksServer.start(300, myCustomServerSocketFactory); // eg. SSL on port 300

socksServer.stop(); // stops server on all ports

For use in junit tests:

	@ClassRule
	public static final SockServerRule sockServerRule = new SockServerRule(PROXY_SERVER_PORT);
	
	// or
	
	@ClassRule
	public static final SockServerRule sockServerRule = new SockServerRule(PROXY_SERVER_PORT, myServerSocketFactory);

And that's it!

Change history

v2.0.0 (26-December-2021)

  • Switched to Java 8 and included fix for recent log4j security issue

v1.1.0 (15-April-2021)

  • #4 added support for custom server socket factory (so you are free to configure SSL)

v1.0.2 (5-July-2020)

  • Bumped log4j-core from 2.6.1 to 2.13.2

v1.0.1 (6-December-2019)

  • Removed Jacoco instrumentation from production code

v1.0.0 (6-December-2019)

Initial release

4-December-2019

Initial upload

About

Java SOCKS 4/5 server implementation for Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%