residuum/PuRestJson

proxy usage

deedos opened this issue · 12 comments

Hello. First at all, this external is very, very nice, so much thanks for sharing it!
I 'm using as a Twitter client, pretty much like the example and it works flawlessly, although when i 'm behind a proxy, It does not work. I suppose could be because pd-extended cannot see the windows or O.S proxy config ? is there a way to declar the proxy config/path in the patch ?

many thanks in advance

I have implemented a [proxy( method in the branch proxy. Please build and try, the method is documented in the help as well.

Reading system wide proxy settings is not trivial, and I will not do it in the foreseeable future.

If it is working, I will include the function in the next release and will document it in the wiki and manual.

@deedos Have you had any chance to test the functionality? Im preparing another release for December and would like to include it.

Hi Thomas.

I have not yet, once I was using unfortunetely o n Windows and is quite
difficult to compile on it. I'll make my best to test using ubuntu asap and
repot you back. Thanks a lot

2015-11-10 12:02 GMT-02:00 Thomas Mayer notifications@github.com:

@deedos https://github.com/deedos Have you had any chance to test the
functionality?


Reply to this email directly or view it on GitHub
#38 (comment).

Daniel Roviriego
(21) 972361654

I have compiled [rest] and [oauth] and packed it with the updated help: https://ssl-account.com/cloud.residuum.org/index.php/s/lziFBW7OkcoDcpi

@deedos have you been able to test?

@residuum I could that now! Not so good news,
I declare a working proxy for my network and it does not work. When banging "GET http://ix.residuum.org/pd/proxy_test.php" to my "oauth" object I get: "Error while performing request: Failure when receiving data from the peer". and sometimes I get this error as well "status: 56 Failure when receiving data from the peer"

Nevertheless, when using the proxy with the REST object, it´s working as expected.I bang I get my IP back.

I ´m using Windows 2008 Server, purestJSON 1.3 versions with your pre compilled binaries. many thanks

I am not understanding your last remarks. Do you mean, that using the [proxy parameters( message does not enable using your proxy? Or do you mean that the object does not take your default OS proxy?

The proxy features works for "rest" and do not work for "oauth".
Thanks
Em 25/11/2015 21:27, "Thomas Mayer" notifications@github.com escreveu:

I am not understanding your last remarks. Do you mean, that using the [proxy
parameters( message does not enable using your proxy? Or do you mean that
the object does not take your default OS proxy?


Reply to this email directly or view it on GitHub
#38 (comment).

This is strange, because testing [oauth] with the proxy method is working here, I have verified with Wireshark.

If you e.g. rename [rest] to [oauth] in the help patch, then no state is saved, you will have to send a new [proxy( message to the [oauth] object before making a request using that proxy.

A possibility: Are you calling a TLS secured domain? In that case, you need to download SSL certificates in PEM format, see the compilation instructions for the link. It must be saved to the same folder as [rest] and [oauth] and be called cacert.pem (see ctw.c)

Hi Thomas.

I'm using with twitter api endpoints, probably is a TLS secured domain, no
? Even though, I 'm using the disbale ssl feature. Anyway, I 'll try this
asap and give a feedback. thanks again !

2015-11-26 21:12 GMT-02:00 Thomas Mayer notifications@github.com:

A possibility: Are you calling a TLS secured domain? In that case, you
need to download SSL certificates in PEM format, see the compilation
instructions
https://github.com/residuum/PuRestJson/wiki/Compilation#cross-compilation-for-windows-on-unix-like-systems-linux--bsd--mac-os-x-with-mxe
for the link. It must be saved to the same folder as [rest] and [oauth]
and be called cacert.pem (see ctw.c
https://github.com/residuum/PuRestJson/blob/master/src/inc/ctw.c#L633)


Reply to this email directly or view it on GitHub
#38 (comment).

Daniel Roviriego
(21) 972361654

Included in latest release.