VPN and tsNet
matthias_livecode_150811 at m-r-d.de
matthias_livecode_150811 at m-r-d.de
Tue Oct 27 10:14:34 EDT 2020
Just want to confirm that using "interface" in the settings array works here.
First i've called a LC Server script on a web server without using interface. The script returns the remote ip.
put tsNetGetSync("https://xxxxxxxx.xx/remoteIP.lc",xHeaders,rOutHeaders,rResult,rBytes)
It returned my public ip of my office.
Then i called the same script, but used interface and set it with my remote VPN ip address
put "192.168.1.201" into tSettings["interface"]
put tsNetGetSync("https://xxxxxxxx.xx/remoteIP.lc",xHeaders,rOutHeaders,rResult,rBytes,tSettings)
The script now returned the public internet ip of the remote office.
Amazing! tsNET is so powerful.
Regards,
Matthias
-
Matthias Rebbe
Life Is Too Short For Boring Code
> Am 27.10.2020 um 11:03 schrieb Mark Waddingham via use-livecode <use-livecode at lists.runrev.com>:
>
> On 2020-10-27 01:05, Brian Milby via use-livecode wrote:
>> I have a fairly simple stack that I use to get FedEx tracking data
>> using tsNetPostSync. It has worked fine until a new VPN connection
>> was added. The only change that I know is that it no longer allows a
>> split tunnel so everything must go through the VPN. Assuming that is
>> the issue, how do I configure tsNet to use the VPN instead of trying
>> to connect directly? (I’m pretty sure that proxy is not enabled yet,
>> but that is probably coming too). I did try to set the
>> defaultNetworkInterface but it did not seem to have any impact. For
>> now I am just disconnecting the VPN to pull the data.
>
> I *think* the 'interface' setting is what you want:
>
> “interface”: (Introduced in tsNet version 1.4.0) Specify the interface, IP address or host name to be used for the outgoing connection.
>
> This should be set to the local ip address of the interface (i.e. VPN) you want the socket connection to come from on the local machine.
>
> Warmest Regards,
>
> Mark.
>
> P.S. Hopefully Charles can correct this if I'm wrong!
>
> --
> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list