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

fix backward compatibility issue #946

Merged
merged 2 commits into from
Mar 27, 2024
Merged

fix backward compatibility issue #946

merged 2 commits into from
Mar 27, 2024

Conversation

pheiduck
Copy link
Contributor

@pheiduck pheiduck commented Mar 27, 2024

Fixes #943
Closes #140
Closes #922
Thank you @utkarsh867

@pheiduck pheiduck added this to the v13 milestone Mar 27, 2024
@pheiduck
Copy link
Contributor Author

it's not fixing the issue at all:

 module.exports.WG_DEFAULT_ADDRESS = process.env.WG_DEFAULT_ADDRESS.repla   │
│   ce('x', '0') || '10.8.0.0';                                                │
│                                                                      ^       │
│   2024-03-27T13:39:58.376205588Z                                             │
│   TypeError: Cannot read properties of undefined (reading 'replace')         │
│       at Object.<anonymous> (/app/config.js:17:68)                           │
│       at Module._compile (node:internal/modules/cjs/loader:1356:14)          │
│       at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)   │
│       at Module.load (node:internal/modules/cjs/loader:1197:32)              │
│       at Module._load (node:internal/modules/cjs/loader:1013:12)             │
│       at Module.require (node:internal/modules/cjs/loader:1225:19)           │
│       at require (node:internal/modules/helpers:177:18)                      │
│       at Object.<anonymous> (/app/lib/WireGuard.js:30:5)                     │
│       at Module._compile (node:internal/modules/cjs/loader:1356:14)          │
│       at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)   │
│   2024-03-27T13:39:58.376485269Z                                             │
│   Node.js v18.19.1

@utkarsh867
Copy link
Contributor

it's not fixing the issue at all:

 module.exports.WG_DEFAULT_ADDRESS = process.env.WG_DEFAULT_ADDRESS.repla   │
│   ce('x', '0') || '10.8.0.0';                                                │
│                                                                      ^       │
│   2024-03-27T13:39:58.376205588Z                                             │
│   TypeError: Cannot read properties of undefined (reading 'replace')         │
│       at Object.<anonymous> (/app/config.js:17:68)                           │
│       at Module._compile (node:internal/modules/cjs/loader:1356:14)          │
│       at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)   │
│       at Module.load (node:internal/modules/cjs/loader:1197:32)              │
│       at Module._load (node:internal/modules/cjs/loader:1013:12)             │
│       at Module.require (node:internal/modules/cjs/loader:1225:19)           │
│       at require (node:internal/modules/helpers:177:18)                      │
│       at Object.<anonymous> (/app/lib/WireGuard.js:30:5)                     │
│       at Module._compile (node:internal/modules/cjs/loader:1356:14)          │
│       at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)   │
│   2024-03-27T13:39:58.376485269Z                                             │
│   Node.js v18.19.1

that is strange. I did test it.

@utkarsh867
Copy link
Contributor

Ah I see! In the case that WG_DEFAULT_ADDRESS is not defined, things break. oversight on my part. I can help solve this.

@pheiduck
Copy link
Contributor Author

Have reverted #888 again. If we have a proper fix for issues which happend with that I can approve it.

@pheiduck
Copy link
Contributor Author

pheiduck commented Mar 27, 2024

I have - WG_DEFAULT_ADDRESS_IPV4=10.8.0.x
Also when using - WG_DEFAULT_ADDRESS=10.8.0.x it's not working

@utkarsh867
Copy link
Contributor

utkarsh867 commented Mar 27, 2024

WG_DEFAULT_ADDRESS_IPV4 is a valid configuration?

WG_DEFAULT_ADDRESS works on my end.

image image

And I can connect to the VPN as well.

Result wg0 config:

image

@pheiduck
Copy link
Contributor Author

WG_DEFAULT_ADDRESS_IPV4 is a valid configuration?

Yep, was from a diffrent fork I guess.
Works with WG_DEFAULT_ADDRESS also latest/12 works with that.

@pheiduck pheiduck merged commit 6045c2a into master Mar 27, 2024
5 checks passed
@pheiduck pheiduck deleted the feat-cidr-notation branch March 27, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants