Git Product home page Git Product logo

Comments (8)

Ange-Cesari avatar Ange-Cesari commented on May 24, 2024 1

Hi @teon

Would it be possible to have a link to that roadmap ? I couldn't find it on github. Is it public ?

Best,
Ange

from wireguard-rs.

teon avatar teon commented on May 24, 2024

Right now we do not support pre-shared key, but we will put this on the roadmap.

from wireguard-rs.

master-hax avatar master-hax commented on May 24, 2024

fwiw i'm using this as a workaround at the moment:

let mut file = NamedTempFile::new()?;
writeln!(file, "{}", preshared_key.to_string());
let path = file.into_temp_path();
println!("wrote psk to file {:#?}", path);

let output = std::process::Command::new("wg")
.args(["set", interface_name, "peer", &peer_public_key.to_string(), "preshared-key", path.to_str().unwrap()])
.output()?;

path.close()?;

from wireguard-rs.

Ange-Cesari avatar Ange-Cesari commented on May 24, 2024

Hey @master-hax ,

Thank you for the work around.
Unfortunately I can't write on the disk and I can't process command from the binary due to security reasons, so I guess I'll have to wait for @wojcik91 to implement it.

Best,
Ange

from wireguard-rs.

wojcik91 avatar wojcik91 commented on May 24, 2024

Hi @Ange-Cesari & @master-hax!
I did not have time to look into this yet, but from what I know the Peer struct already includes an optional preshared_key field.

Did you try it out?

from wireguard-rs.

master-hax avatar master-hax commented on May 24, 2024

Hi @Ange-Cesari & @master-hax!
I did not have time to look into this yet, but from what I know the Peer struct already includes an optional preshared_key field.

Did you try it out?

Yes I've tried it out.

The key passed to the struct is persisted and looks like it gets applied when the interface configuration is read back.

However, if we double-check the peer with wg showwe can see that the preshared key is not set.

from wireguard-rs.

Ange-Cesari avatar Ange-Cesari commented on May 24, 2024

Hey, @wojcik91

I tried too,

It seems it's not a structure issue, it's an interface configuration issue and more like how are applied the different fields

from wireguard-rs.

wojcik91 avatar wojcik91 commented on May 24, 2024

Hi.
There was indeed a bug in Linux implementation. Should be resolved now by #21. I'll make a new patch release shortly.

from wireguard-rs.

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.