Connection is too slow, needed http proxy support
Our project, https://github.com/moecube/srvpro, attempting to automatically host YGOPro (https://github.com/Fluorohydride/ygopro) tournaments, used your API by this module to automatically seed and seat players into servers and post the score after the match up. However, I received several complaints from many players that the connection to the server is too slow, and they wish to have a better tourney experience. During our investigation, we found that it is because of issues of international connections your server that make the connection so slow. I'm not sure if this is one of those things you could fix. It would be my honor if it is possible for you to add an option which allow me to use an http proxy to connect to your server. It is ok for us to to purchase a better proxy. Thanks for reading this. We will continue supporting Challonge.
I have a PR open that would allow setting the hostname for the client. See #35. This would allow for something like:
const client = Challonge.createClient({
apiHostname: 'www.someproxydomain.com'
});
If this would solve this issue, I'll get tests/docs updated, get it merged, and released to npm ASAP.
--
Just to clarify, I'm not affiliated with the actual challonge website. I use their service for one of my projects and wrote this API wrapper as a result. If you need to get in touch with the owners, their feedback forum is here:
http://feedback.challonge.com/forums/44455-feature-requests
To tell the truth, at last I added api.challonge.com into /etc/hosts, which got my connection problem solved. Thanks anyway.
Well, I looked carefully through the http node module. It really has an option to choose whether to use a proxy or not.
What I really expect is, to add this option to the Challonge.createClient function, just like:
const client = Challonge.createClient({ proxy: <proxy settings in nodejs> });
We would be so glad if you could spend a little time adding this option.
Thanks!
I'm not sure which option you are referring to, can you link me to where that is in the docs?
I believe the native https.request method accepts the same options as the http.request method. I don't see a proxy option in the arguments list:
https://nodejs.org/api/http.html#http_http_request_options_callback