alex
alex

Reputation: 1917

Gatling SOCKS proxy

I'm setting socks5 proxy in Gatling script like this

http("request1")
.post("https://myurl.com")
.proxy(Proxy("localhost", 7777).socks5)

but in the log it shows as HttpProxyServer instead of Socks5ProxyServer

proxy=HttpProxyServer{realm=null, securedPort=7777, securedAddress=localhost/127.0.0.1:7777, host='localhost', port=7777}

and my requests timeout

i verified socks proxy is working via curl, also it works in jmeter using -DsocksProxyHost=localhost -DsocksProxyPort=7777

Upvotes: 0

Views: 641

Answers (1)

alex
alex

Reputation: 1917

this is fixed now: https://github.com/gatling/gatling/issues/3777 , Thanks Stephane!

I verified it works now after building Gatling from source*

i can see correct proxy now as well, and request goes through

proxy=Socks5ProxyServer{realm=null, host='localhost', port=7777}

*Note: to build gatling from source you need to build 3 projects (I wish this was part of documentation):

    1) git clone [email protected]:gatling/gatling.git

      update gatling/version.sbt to e.g. 3.2.1-SNAPSHOT

      cd gatling; sbt publishM2; cd ../  

    2) git clone [email protected]:gatling/gatling-highcharts.git

       update gatling-highcharts/version.sbt to e.g. 3.2.1-SNAPSHOT

       cd gatling-highcharts; sbt publishM2; cd ../  

    3) git clone [email protected]:gatling/gatling-highcharts-maven-archetype.git  

      update version in gatling-highcharts-maven-archetype/pom.xml to e.g. 3.2.1-SNAPSHOT

      cd gatling-highcharts-maven-archetype; mvn clean install; 

      cd  target/gatling-charts-highcharts-bundle-3.2.1-SNAPSHOT
       bin/gatling.sh

Upvotes: 0

Related Questions