XChange icon indicating copy to clipboard operation
XChange copied to clipboard

Support for tinyproxy at the connect method of NettyStreamingExchange

Open scrisini opened this issue 4 years ago • 7 comments

Overview

Due the firm I work form's use of reverse proxy extensively based on tinyproxy. deploying and connecting to a number of providers such as kraken,binance, coinbasepro we had to basically modify several classes to support wss connection stage changes were made NettyStreamingService

  • for handling proxy settings and connect initiattion BitstampStreamingExchange to ensure the default implementation of applyStreamingSpecification in StreamingExchange is invoked

below is a snippet of StreamingExchange, as modified default void applyStreamingSpecification(ExchangeSpecification exchangeSpec, NettyStreamingService<?> streamingService){ streamingService.setSocksProxyHost((String) exchangeSpec.getExchangeSpecificParametersItem(SOCKS_PROXY_HOST)); streamingService.setSocksProxyPort((Integer) exchangeSpec.getExchangeSpecificParametersItem(SOCKS_PROXY_PORT)); streamingService.setHttpProxyHost(exchangeSpec.getProxyHost()); streamingService.setHttpProxyPort(exchangeSpec.getProxyPort()); streamingService.setBeforeConnectionHandler((Runnable) exchangeSpec.getExchangeSpecificParametersItem(ConnectableService.BEFORE_CONNECTION_HANDLER));

    Boolean accept_all_ceriticates = (Boolean) exchangeSpec.getExchangeSpecificParametersItem(ACCEPT_ALL_CERITICATES);

scrisini avatar Aug 11 '20 13:08 scrisini

Hi @scrisini - this sounds good. Would you be willing to raise a PR with the changes? I'm sure others would find them useful.

badgerwithagun avatar Aug 15 '20 08:08 badgerwithagun

Hi @badgerwithagun great! will do. im a newbie on this so I just clone the latest and follow the guidelines and then ready I submit for peer review and PR?

scrisini avatar Aug 17 '20 07:08 scrisini

Yes, @scrisini, don't worry about making mistakes. You can't break anything ;).

Someone will let you know if your PR needs work.

badgerwithagun avatar Aug 22 '20 16:08 badgerwithagun

Hi has taken me a while to catchup. but im ready to create a PR but not sure how this is done here

  1. I cloned the repo today
  2. branched off from develop - named it tinyproxy_3647
  3. however im now ready to push to GitHub and do a PR
  4. but looks like my username isn't permitted to do that? Cheers
image

scrisini avatar Sep 03 '21 14:09 scrisini

Yes, @scrisini, don't worry about making mistakes. You can't break anything ;).

Someone will let you know if your PR needs work.

Hello just following this up as I now have incorporated the fix to the latest cloned copy and would like to know whats next step to create a PR? thank you.

scrisini avatar Sep 08 '21 06:09 scrisini

google it. lot's of info out there already on creating a PR on github

timmolter avatar Sep 08 '21 11:09 timmolter

Thanks! I should have read a bit more ! all sorted - I missed the fork step.

scrisini avatar Sep 08 '21 12:09 scrisini