Giter Site home page Giter Site logo

firezone / wireguardex Goto Github PK

View Code? Open in Web Editor NEW
64.0 12.0 8.0 181 KB

Configure WireGuard® interfaces in Elixir using Rust NIFs.

Home Page: https://hex.pm/packages/wireguardex

License: Apache License 2.0

Elixir 68.45% Rust 31.55%
elixir erlang nif rust wireguard hexpm

wireguardex's People

Contributors

conectado avatar jamilbk avatar kianmeng avatar philss avatar princemaple avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wireguardex's Issues

Unify terminology

We have remove_peer and delete_device. Might want to unify terminology?

If it's some kind of convention then ignore me 😅

`public_key` name collision in DeviceConfigBuilder and PeerConfigBuilder

== 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?

0.3.0

Open an issue for timing 0.3.0 release

Support x86_64-unknown-linux-musl for alpine

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"

Error downloading NIF during mix compile

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?

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.