首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gatling SOCKS代理

Gatling SOCKS代理
EN

Stack Overflow用户
提问于 2019-08-02 03:17:32
回答 1查看 406关注 0票数 0

我在Gatling脚本中设置socks5代理,如下所示

代码语言:javascript
复制
http("request1")
.post("https://myurl.com")
.proxy(Proxy("localhost", 7777).socks5)

但在日志中,它显示为HttpProxyServer而不是Socks5ProxyServer

代码语言:javascript
复制
proxy=HttpProxyServer{realm=null, securedPort=7777, securedAddress=localhost/127.0.0.1:7777, host='localhost', port=7777}

和我的请求超时

我验证了socks代理可以通过curl工作,也可以在使用-DsocksProxyHost=localhost -DsocksProxyPort=7777的jmeter中工作。

EN

回答 1

Stack Overflow用户

发布于 2019-08-02 07:36:59

现在修复了:https://github.com/gatling/gatling/issues/3777,谢谢斯蒂芬!

在从源代码构建Gatling之后,我现在验证了它是否有效*

我现在也可以看到正确的代理,并且请求通过

代码语言:javascript
复制
proxy=Socks5ProxyServer{realm=null, host='localhost', port=7777}

*注意:要从源构建gatling,您需要构建3个项目(我希望这是文档的一部分):

代码语言:javascript
复制
    1) git clone git@github.com:gatling/gatling.git

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

      cd gatling; sbt publishM2; cd ../  

    2) git clone git@github.com: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 git@github.com: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
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57315700

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档