Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will not working on windows of non-Englisht language #19

Closed
chengxuncc opened this issue May 1, 2019 · 2 comments
Closed

Will not working on windows of non-Englisht language #19

chengxuncc opened this issue May 1, 2019 · 2 comments

Comments

@chengxuncc
Copy link

chengxuncc commented May 1, 2019

In gateway_common.go:

func parseWindowsRoutePrint(output []byte) (net.IP, error) {
	lines := strings.Split(string(output), "\n")
	for idx, line := range lines {
		if strings.HasPrefix(line, "Active Routes:") {
			if len(lines) <= idx+2 {
				return nil, errNoGateway
			}
...

If default language is non-English, "Active Routes" will be translated.

@puyangsky
Copy link

same problem

@ndeloof
Copy link
Contributor

ndeloof commented Nov 7, 2019

Here is the typical output of the route command on Windows 10 configured with French locale:

IPv4 Table de routage
===========================================================================
Itinéraires actifs :
Destination réseau    Masque réseau  Adr. passerelle   Adr. interface Métrique
          0.0.0.0          0.0.0.0      192.168.8.1    192.168.8.101     35
===========================================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants