Go to file
_ 5ad59b9347 v0.1.7 2025-03-21 14:04:28 -05:00
.github/workflows Update rust.yml 2021-12-16 16:14:07 -06:00
src cleaned up and added install subcommand 2025-03-21 13:38:33 -05:00
.gitignore 🐣 so that's how multicast groups work 2021-11-26 21:46:27 +00:00
.gitmodules ⬆️ use directories v5.0.0 instead of vendoring it 2023-03-31 05:45:40 +00:00
COPYING 📝 preparing to publish 2021-12-05 23:53:32 +00:00
Cargo.lock v0.1.7 2025-03-21 14:04:28 -05:00
Cargo.toml v0.1.7 2025-03-21 14:04:28 -05:00
README.md cleaned up and added install subcommand 2025-03-21 13:38:33 -05:00
ideas.md 📝 add idea 2021-12-13 00:25:15 +00:00
issues.md 🐛 bug: fix server crashing when you send it a packet of ":V\n" 2021-12-09 01:46:03 +00:00

README.md

LookAround

"I want to SSH into my laptop, but I keep forgetting its IP!!"

Has this ever happened to you?

$ ping $(lookaround find-nick laptop)
PING 192.168.1.101 (192.168.1.101) 56(84) bytes of data.
...

$ lookaround client

Found 3 peers:
11:11:11:11:11:11 = 192.168.1.101 `laptop`
22:22:22:22:22:22 = 192.168.1.102 `desktop`
33:33:33:33:33:33 = 192.168.1.103 `old-laptop`

LookAround is a Rust program for looking up your computers' MAC and IP addresses within a LAN. There's no central server, so it's not a look-up, it's a look-around.

Installing

Make sure Cargo is installed from RustUp.

# Install LookAround with Cargo
cargo install lookaround

# Find your config directory
# e.g. `$HOME/.config/lookaround`
lookaround config

Use $HOME/.config/lookaround/client.ini as a hosts file if it's more convenient for your client to be the source of truth for nicknames.

[nicknames]
11-11-11-11-11-11 = bob-laptop
22-22-22-22-22-22 = alice-desktop

LookAround will use the system's hostname as its server nickname. If you have a generic hostname like ubuntu, override this in $HOME/.config/lookaround/server.ini:

[server]
nickname = alice-desktop

Auto-Start (Linux)

Run lookaround install or lookaround install $NICKNAME if you want to set a nickname.

This will create $HOME/.config/lookaround/server.ini and $HOME/.config/systemd/user/lookaround.service, and start the systemd user service.

To check that it's running

systemctl --user status lookaround
lookaround client

Auto-Start (Windows)

(untested)

  • Create a shortcut to the LookAround exe
  • Change the shortcut's target to end in lookaround.exe server so it will run the server
  • Cut-paste the shortcut into the Startup folder in C:\ProgramData\somewhere

Usage

Run the server manually: (To test before installing)

lookaround server --nickname my-computer

On a client computer:

# Use the `find-nick` subcommnad to find an IP...
lookaround find-nick laptop
# Prints `192.168.1.101`

# Or ping it...
ping $(lookaround find-nick laptop)

# Or SSH to it...
ssh user@$(lookaround find-nick laptop)

# Or pull a file from it
# (after starting `nc -l -p 9000 < some-file` on the laptop)
nc $(lookaround find-nick laptop) 9000

# Use the `client` subcommand to find all servers in the same multicast domain
lookaround client

# Use a longer timeout if servers need more than 500 ms to respond
lookaround client --timeout-ms 1000

Contributing

Pull requests are welcome. This is a hobby project, so I may reject contributions that are too big to review.

Use the kazupon Git commit message convention

License

AGPL-3.0

This Git repo

This repo's upstream is https://six-five-six-four.com/git/reactor/lookaround. It's mirrored on my GitHub, https://github.com/ReactorScram/lookaround

I don't use GitHub issues, so issues are in issues.md in the repo.