Skip to content

Latest commit

 

History

History
36 lines (36 loc) · 1.22 KB

readme.md

File metadata and controls

36 lines (36 loc) · 1.22 KB

server mode

target$ java -jar nydus-1.0-SNAPSHOT.jar --type=server --targetHostPort=localhost:22 --pipeListenerPort=8443

client mode

target$ java -jar nydus-1.0-SNAPSHOT.jar --type=client --pipeUrl=wss://10.230.18.8:8443/pipe --proxyHostPort=localhost:6666 --proxyUserPwd=user:pwd --forwarderPort=8888

server ssl certificate

  • generate

    keytool -genkey -v -alias jetty -keyalg RSA -keysize 2048 -keystore keystore.jks -validity 3650 -providername SUN
  • keystore.jks

    put keystore on classpath or src/main/resources during build

example

target$ java -jar nydus-1.0-SNAPSHOT.jar --type=server --targetHostPort=localhost:2222 --pipeListenerPort=8443
target$ java -jar nydus-1.0-SNAPSHOT.jar --type=client --pipeUrl=wss://10.230.18.8:8443/pipe --forwarderPort=8888
netcat -lp 2222
netcat localhost 8888

docker

  • build

    mvn clean package -Pdocker
  • run

    server
    docker run -d --name nydus --rm -p 443:8443 p4km9y/nydus --targetHostPort=10.132.0.2:22 --pipeListenerPort=8443
    client
    docker run --rm -p 8888:8888 p4km9y/nydus --type=client --pipeUrl=wss://10.132.0.2:443/pipe