Tickets application server behind an internet proxy

4 views
Skip to first unread message

Mateusz Morawski

unread,
Aug 18, 2010, 10:06:58 AM8/18/10
to Open Source CAD - Dev
I discovered that CURL library is used in Tickets at the sever side to
communicate with tracking services. How to configure proxy for all
CURL invocations when tickets application server is behind internet
proxy? For my testing purposes I've just added additional entries
within the php code but It's just my workaround.

Besides I discovered that aprs tracking code does not use CURL and I
had to replace the fopen / fgets functions with CURL code to use
proxy.

Regards,
Mateusz Morawski

Arnie Shore

unread,
Aug 18, 2010, 10:15:11 AM8/18/10
to open-sourc...@googlegroups.com
I don't currently have a way to test behind a proxy, so if you have any thoughts/code re a general solution to that issue pls do share. 

AS


--
You received this message because you are subscribed to the Google Groups "Open Source CAD - Dev" group.
To post to this group, send email to open-sourc...@googlegroups.com.
To unsubscribe from this group, send email to open-source-cad-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/open-source-cad---dev?hl=en.


Mateusz Morawski

unread,
Aug 19, 2010, 7:50:50 AM8/19/10
to Open Source CAD - Dev
You could create global variables such as proxy_host, proxy_port,
proxy_user, proxy_password. This should be configurable thru Tickets
config page. Now, within the code where CURL calls are used you can
add the following instructions:

curl_setopt($ch, CURLOPT_PROXY, $GLOBALS['CURL_PROXY']);

where, e.g.
$GLOBALS['CURL_PROXY'] = "proxy-host:8888";

For my own purposes I've put such global definition into
functions.inc.php.
It's a very basic workaround which could certainly be improved, but it
works.

Besides, you should replace all fopen / fgest instructions related to
sending messages over internet by CURL instructions.

Regards,
Mateusz Morawski
> > open-source-cad-...@googlegroups.com<open-source-cad---dev%2Bunsu...@googlegroups.com>
> > .

Arnie Shore

unread,
Aug 19, 2010, 7:59:32 PM8/19/10
to open-sourc...@googlegroups.com
I'm thinking of it as another setting value, with, say, slash-separated elements you note.  But is the forward slash a  safe separator?

AS

Mateusz Morawski

unread,
Aug 23, 2010, 5:10:34 AM8/23/10
to Open Source CAD - Dev

I propose the following setting values:
proxy enabled (values: 0,1)
proxy host
proxy port
proxy user
proxy password

The port, user and password settings should be treated as optional (if
use proxy set to 1).

--
Regards,
Mateusz Morawski
Reply all
Reply to author
Forward
0 new messages