Giter VIP home page Giter VIP logo

Comments (3)

nielspeen avatar nielspeen commented on July 29, 2024

Using that version would re-introduce issue #5 and undo other small changes.

The commands used to configure the TAP interface appear identical though. Do you have any idea why the included script is failing for you?

from openconnect-gui.

nmav avatar nmav commented on July 29, 2024

The script bundled in the gui client is newer than the one you refer to. If there is some issue in that script please try to identify it using the log or if you cannot see the issue try posting the log here.

On 18 October 2014 19:09:14 CEST, Miguel Scapolla [email protected] wrote:

Hi!. Please, update the script vpnc-script-win.js. The latest version
can be downloaded from this
page
which
contains the latest
script.
With the bundled script in OpenConnect-GUI 0.6, the TAP interface is
not configured. If I manually change the IP address of the TAP
interface and configure the static routes with route add, everything
works ok (with the bundled script). If I copy the new script to the
OpenConnect folder, everything works ok without any manual
configuration. Tested in Windows XP SP 2 32 bits. Thanks.


Reply to this email directly or view it on GitHub:
#18

Sent fron my mobile. Please excuse my brevity.

from openconnect-gui.

migueloangelo avatar migueloangelo commented on July 29, 2024

Hi! After some debugging, I have created a pull request with this patch, works for me. Thanks.

diff --git a/nsis/vpnc-script-win.js b/nsis/vpnc-script-win.js
index 98f9a50..e62956f 100755
--- a/nsis/vpnc-script-win.js
+++ b/nsis/vpnc-script-win.js
@@ -34,7 +34,9 @@ function exec(cmd)
        if (fs.FileExists(tmpdir + "vpnc.out")) {
                var f = fs.OpenTextFile(tmpdir + "vpnc.out", 1);
                if (f) {
-                       s = f.ReadAll();
+                      if (!f.AtEndOfStream) {
+                           s = f.ReadAll();
+                       }
                        log.Write(s);
                        f.Close();
               }
@@ -66,7 +68,7 @@ function waitForInterface() {
 // Script starts here
 // --------------------------------------------------------------

-var internal_ip4_netmask = "255.255.255.0"
+var internal_ip4_netmask = "255.255.255.0";

 var ws = WScript.CreateObject("WScript.Shell");
 var env = ws.Environment("Process");
@@ -191,7 +193,7 @@ case "connect":
                echo("Configuring Legacy IP networks:");
                if (env("INTERNAL_IP6_NETMASK") && !env("INTERNAL_IP6_NETMASK").match("/128$")) {
                        exec("netsh interface ipv6 add route " + env("INTERNAL_IP6_NETMASK") +
-                           " \"" + env("TUNDEV") + "\" fe80::8 store=active")
+                           " \"" + env("TUNDEV") + "\" fe80::8 store=active");
                }

                if (env("CISCO_IPV6_SPLIT_INC")) {
@@ -200,7 +202,7 @@ case "connect":
                                var netmasklen = env("CISCO_SPLIT_INC_" + i +
                                                 "_MASKLEN");
                                exec("netsh interface ipv6 add route " + network + "/" +
-                                   netmasklen + " \"" + env("TUNDEV") + "\" fe80::8 store=active")
+                                   netmasklen + " \"" + env("TUNDEV") + "\" fe80::8 store=active");
                        }
                } else {
                        echo("Setting default IPv6 route through VPN.");

from openconnect-gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.