firezone / wireguardex Goto Github PK
View Code? Open in Web Editor NEWConfigure WireGuard® interfaces in Elixir using Rust NIFs.
Home Page: https://hex.pm/packages/wireguardex
License: Apache License 2.0
Configure WireGuard® interfaces in Elixir using Rust NIFs.
Home Page: https://hex.pm/packages/wireguardex
License: Apache License 2.0
We have remove_peer and delete_device. Might want to unify terminology?
If it's some kind of convention then ignore me 😅
== Compilation error in file lib/meshed/peer.ex ==
** (CompileError) lib/meshed/peer.ex:85: function public_key/2 imported from both Wireguardex.PeerConfigBuilder and Wireguardex.DeviceConfigBuilder, call is ambiguous
(elixir 1.13.4) expanding macro: Kernel.|>/2
lib/meshed/peer.ex:87: Meshed.Peer.peer_to_config/1
Is public_key
needed in DeviceConfigBuilder
? Is there a situation where someone would want to set the public key on the interface?
Open an issue for timing 0.3.0 release
I briefly tested using alpine image base today for production docker image. I got this below:
#22 22.10 == Compilation error in file lib/wireguardex.ex ==
#22 22.10 ** (RuntimeError) Error while downloading precompiled NIF: precompiled NIF is not available for this target: "x86_64-unknown-linux-musl".
#22 22.10 The available targets are:
#22 22.10 - aarch64-unknown-linux-gnu
#22 22.10 - x86_64-unknown-linux-gnu
#22 22.10 - aarch64-apple-darwin
#22 22.10 - x86_64-apple-darwin.
#22 22.10
#22 22.10 You can force the project to build from scratch with:
#22 22.10
#22 22.10 config :rustler_precompiled, :force_build, wireguardex: true
#22 22.10
#22 22.10 In order to force the build, you also need to add Rustler as a dependency in your `mix.exs`:
#22 22.10
#22 22.10 {:rustler, ">= 0.0.0", optional: true}
#22 22.10
#22 22.10 lib/wireguardex.ex:13: (module)
#22 22.10 (elixir 1.13.4) lib/kernel/parallel_compiler.ex:346: anonymous fn/5 in Kernel.ParallelCompiler.spawn_workers/7
#22 22.10 could not compile dependency :wireguardex, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile wireguardex", update it with "mix deps.update wireguardex" or clean it with "mix deps.clean wireguardex"
I'm encountering the following error whilst running mix compile
with Wireguardex 0.3.6 as a dependency (with Elixir 1.15.7):
==> rustler_precompiled
Compiling 4 files (.ex)
Generated rustler_precompiled app
==> wireguardex
Compiling 8 files (.ex)
21:38:22.983 [debug] Downloading NIF from https://github.com/firezone/wireguardex/releases/download/v0.3.6/libwireguard_nif-v0.3.6-nif-2.16-x86_64-unknown-linux-gnu.so.tar.gz
== Compilation error in file lib/wireguardex.ex ==
** (RuntimeError) Error while downloading precompiled NIF: couldn't fetch NIF from https://github.com/firezone/wireguardex/releases/download/v0.3.6/libwireguard_nif-v0.3.6-nif-2.16-x86_64-unknown-linux-gnu.so.tar.gz: {:error, {:failed_connect, [{:to_address, {~c"github.com", 443}}, {:inet, [:inet], {:eoptions, {:undef, [{:tls_record, :supported_protocol_versions, [], []}, {:ssl, :default_versions, 1, [file: ~c"ssl.erl", line: 1715]}, {:ssl, :opt_versions, 3, [file: ~c"ssl.erl", line: 1704]}, {:ssl, :process_options, 3, [file: ~c"ssl.erl", line: 1629]}, {:ssl, :handle_options, 5, [file: ~c"ssl.erl", line: 1659]}, {:ssl, :connect, 4, [file: ~c"ssl.erl", line: 628]}, {:http_transport, :connect, 4, [file: ~c"http_transport.erl", line: 82]}, {:httpc_handler, :connect, 4, [file: ~c"httpc_handler.erl", line: 757]}]}}}]}}.
You can force the project to build from scratch with:
config :rustler_precompiled, :force_build, wireguardex: true
In order to force the build, you also need to add Rustler as a dependency in your `mix.exs`:
{:rustler, ">= 0.0.0", optional: true}
lib/wireguardex.ex:13: (module)
could not compile dependency :wireguardex, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile wireguardex --force", update it with "mix deps.update wireguardex" or clean it with "mix deps.clean wireguardex"
The URL is valid and I can download the NIF successfully.
Any idea what might be the cause?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.