tsNet and proxy servers

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

tsNet and proxy servers

Post by trevordevore » Tue May 02, 2017 12:37 am

Hi,

I'm looking for information on proxy servers and tsNet. I have the following questions at the moment:

1. I see in tsNetLibURL that the proxy server for a given url is passed in to ulExtHandleRequest. It doesn't seem that libUrlSetAuthCallback is respected, however. What happens if a 407 error is returned? I'm trying to test but I don't know that the proxy is being respected. The proxy server requires a username/password but libURL never reports a 407 error. It makes me wonder if tsNet is actually trying to use the proxy.

2. Is tsNet compiled with support for NTLM authentication on Windows?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: tsNet and proxy servers

Post by trevordevore » Tue May 02, 2017 2:45 pm

I found the tsNetSetDebugCallback command and turned on logging. I have confirmed that tsNet is ignoring the the proxy set with tsNetSetProxy.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

charlesBUSd8qF
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 39
Joined: Wed Apr 11, 2012 10:28 pm

Re: tsNet and proxy servers

Post by charlesBUSd8qF » Thu May 04, 2017 11:33 am

Hi Trevor,

I have found a bug in tsNet on certain platforms related to it ignoring the proxy settings (this will be fixed in tsNet version 1.2.9):

http://quality.livecode.com/show_bug.cgi?id=19650

You can set the proxy username/password directly in tsNetSetProxy or, if you are using tsNet via libUrl, by urlencoding them directly into "the httpproxy". For example:

tsNetSetProxy "http://127.0.0.1:8080", "", "username", "password"
OR
set the httpproxy to "http://username:password@127.0.0.1:8080"

Also, tsNet for Windows is compiled with NTLM support.

Hope that helps,

Regards,

Charles

Post Reply

Return to “Internet”