anywherelan / awl

Securely connect your devices into a private network
https://anywherelan.com
Mozilla Public License 2.0
410 stars 23 forks source link

Question #75

Closed dillfrescott closed 1 year ago

dillfrescott commented 1 year ago

This project is awesome! Is there a way to enable a peer to auto accept requests?

dillfrescott commented 1 year ago

Also, is there a way for a node in a network to have the same ip for everyone?

pymq commented 1 year ago

Hi, thanks!

Is there a way to enable a peer to auto accept requests?

This is not documented yet, but you can manually set autoAcceptAuthRequests param to true in your config file (see README where config file is located or in logs, it is printed on server start). You need to stop server before editing config.

Note that this is not secure: anyone will be able to auto connect to your peer. This feature was intended to use in "public servers". You can enable this flag, add peers and then disable it

Also, is there a way for a node in a network to have the same ip for everyone?

Unfortunately, no. I have plans on feature like "group of peers with shared access to each other", but it's not there yet.

For now, you can manually edit config file, you need to search for knownPeers group and edit ipAddr for each peer.

Hope that helps, any feedback is welcome

dillfrescott commented 1 year ago

Okay! Thank you!

dillfrescott commented 1 year ago

@pymq is there any way you could implement a rough form of a static ip function? I would love to use this app but it makes it nearly impossible without static ip's for my usecases.

pymq commented 1 year ago

@dillfrescott what usecases do you have? I'm asking because I think awl DNS should work just fine for most of them

dillfrescott commented 1 year ago

The dns name depends on what the peer names the connection though, right?

Basically I'm trying to point cloudflare DNS to an in network ip, so only the people that have the server as a peer can access the web server essentially.

pymq commented 1 year ago

The dns name depends on what the peer names the connection though, right?

Yes, by default dns name equals to peer name, but dns name could be changed independently of peer name

Screenshot from web gui ![image](https://github.com/anywherelan/awl/assets/26528802/41250eea-41fc-4690-841b-51d6f64f368f)

Basically I'm trying to point cloudflare DNS to an in network ip, so only the people that have the server as a peer can access the web server essentially.

Interesting, this is necessary to have more human readable address and to easily send links to it to someone?

Do your peer with web server has peer name set? I can propose feature more easily to implement: all peers broadcast their name (as opposite to alias, that you can change) and their names will be set as dns addresses.

Example: peer A has name "something". You added it with an alias "tester". And you can access it with "something.awl" AND "tester.awl". Currently you can access it only with "tester.awl".

dillfrescott commented 1 year ago

I think that could work! Sounds good!

pymq commented 1 year ago

@dillfrescott I totally forgot, you can address peers like {peer_id}.awl - this way you don't need to set anything special in your config in every peer, and you can set this name in dns redirect or something

dillfrescott commented 1 year ago

Oh! Okay!

dillfrescott commented 1 year ago

@pymq the peer id .awl thing isnt working at all :/

dillfrescott commented 1 year ago

It says no such address known

pymq commented 1 year ago

@dillfrescott That's interesting. Could you please provide more details about your system: what OS, version?

Also, could you try with my peer, invite 12d3koowjmujt9b5t1umzgzjlv5yg2viuuf4qjmn65tsrxzgs1p8 and go to http://12d3koowjmujt9b5t1umzgzjlv5yg2viuuf4qjmn65tsrxzgs1p8.awl/ , it should open page with librespeed

dillfrescott commented 1 year ago

@pymq Sure! I am on Windows 11 and I'm just using the latest windows tray binary from releases.

Screenshot 2023-05-14 143302

pymq commented 1 year ago

@dillfrescott Sorry, wrong peer id. Try this one: 12D3KooWJMUjt9b5T1umzgzjLv5yG2ViuuF4qjmN65tsRXZGS1p8

But anyway it's probably bug in awl dns, I didn't test on windows 11, only on 10

dillfrescott commented 1 year ago

Ok i sent the request

pymq commented 1 year ago

It should accept instantly

dillfrescott commented 1 year ago

image

I directly copy-pasted it too

pymq commented 1 year ago

@dillfrescott try now

dillfrescott commented 1 year ago

Hmmm its working. I wonder why it didnt work for me before.

pymq commented 1 year ago

So you managed to connect to your peer with web server by address like {peer_id}.awl and you have now no issues or open questions?

dillfrescott commented 1 year ago

@pymq I found the issue. I have to type the address in my browser before anything on my computer will connect to it. This is an issue because i cannot use the ping command or connect through my game client to the peer id .awl until i physically type it into my browser it seems...

pymq commented 1 year ago

@dillfrescott That's interesting! Does it reproduce on every restart of awl server? Could you please open new issue with bug report and brief description of this bug? I will take a look this week when I find time to setup VM with windows 11

dillfrescott commented 1 year ago

Does it reproduce on every restart of awl server?

Yes! It seems to at least.

Could you please open new issue with bug report and brief description of this bug?

Sure!

dillfrescott commented 1 year ago

I think my questions have been sufficiently answered so I will close this issue. :)