
whosthere v0.8.3
ããŒã«ã«ãšãªã¢ãããã¯ãŒã¯çºèŠããŒã«ãGoã§æžãããã€ã³ã¿ã©ã¯ãã£ããªã¿ãŒããã«ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ïŒTUIïŒä»ãã çŽæçã«LANãçºèŠãæ¢çŽ¢ãçè§£ã§ããŸãã ããã¯ããã¯âŠèª°ãããïŒ ðª
Whosthere
Goã§æžãããã€ã³ã¿ã©ã¯ãã£ããªã¿ãŒããã«ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ïŒTUIïŒãåããããŒã«ã«ãšãªã¢ãããã¯ãŒã¯æ€åºããŒã«ã çŽæçãªæ¹æ³ã§LANãæ€åºãæ¢çŽ¢ãçè§£ã§ããŸãã
Whosthereã¯mDNSããã³SSDPã¹ãã£ããŒã䜿çšããŠãéç¹æš©ã§äžŠè¡ã¹ãã£ã³ãå®è¡ããŸããããã«ãTCP/UDPæ¥ç¶ã詊ã¿ãŠARP解決ãããªã¬ãŒããããšã§ããŒã«ã«ãµãããããã¹ã€ãŒããããã®åŸARPãã£ãã·ã¥ãèªã¿åã£ãŠããŒã«ã«ãšãªã¢ãããã¯ãŒã¯äžã®ããã€ã¹ãèå¥ããŸãããã®ææ³ã«ãããææ Œãããæš©éãå¿ èŠãšããã«ARPãã£ãã·ã¥ãçæãããŸããæ€åºããããã¹ãŠã®ããã€ã¹ã¯OUIã«ãã¯ã¢ããã§æ¡åŒµãããå©çšå¯èœãªå Žåã¯è£œé å ã衚瀺ãããŸãã
Whosthereã¯ããã¹ãŠã®ãããã¯ãŒã¯ç®¡çè ãåããããçåãç§ã®ãããã¯ãŒã¯ã«èª°ãããã®ãïŒãã«çããããã®ã芪ãã¿ãããçŽæçãªæ¹æ³ãæäŸããŸãã

æ©èœ
- ã€ã³ã¿ã©ã¯ãã£ããªTUI: æ€åºãããããã€ã¹ãçŽæçã«ããã²ãŒãããŠæ¢çŽ¢ã§ããŸãã
- é«éãã€äžŠè¡: è€æ°ã®æ€åºæ¹æ³ãåæã«æŽ»çšããŸãã
- ææ Œãããæš©éãäžèŠ: å®å šã«ãŠãŒã¶ãŒç©ºéã§åäœããŸãã
- ããã€ã¹ã®æ¡åŒµ: OUIã«ãã¯ã¢ããã䜿çšããŠããã€ã¹ã®è£œé å ã衚瀺ããŸãã
- çµ±åããŒãã¹ãã£ããŒ: æ€åºããããã¹ãã«å¯Ÿãããªãã·ã§ã³ã®ãµãŒãã¹æ€åºïŒèš±å¯ãåŸãããã€ã¹ã®ã¿ãã¹ãã£ã³ããŠãã ããïŒïŒã
- HTTP APIãåããããŒã¢ã³ã¢ãŒã: ããã¯ã°ã©ãŠã³ãã§å®è¡ããä»ã®ããŒã«ãšçµ±åã§ããŸãã
- ããŒããšèšå®: YAMLèšå®ãéããŠå€èгãšåäœãã«ã¹ã¿ãã€ãºã§ããŸãã
ã€ã³ã¹ããŒã«
Homebrewã§brewã䜿çš:
brew install whosthere
NixOSã§nixã䜿çš:
nix profile install nixpkgs#whosthere
Arch Linuxã§yayã䜿çš:
yay -S whosthere-bin
ã䜿ãã®ããã±ãŒãžãããŒãžã£ãŒããªã¹ãã«ãªãå Žåã¯ããã€ã§ãGoã§ã€ã³ã¹ããŒã«ã§ããŸã:
go install github.com/ramonvermeulen/whosthere@latest
ãŸãã¯ãœãŒã¹ãããã«ã:
git clone https://github.com/ramonvermeulen/whosthere.git
cd whosthere
make build
ããã«ããªãªãŒã¹ããŒãžãããã«ãæžã¿ãã€ããªãããŠã³ããŒãã§ããŸãã
äœ¿çšæ¹æ³
ã€ã³ã¿ã©ã¯ãã£ããªæ€åºã®ããã«TUIãå®è¡:
whosthere
åäžã®ã¹ãã£ã³ãå®è¡ããŠçµæãåºåããCLIãšããŠå®è¡:
whosthere scan -t 5
çµæãJSONãã¡ã€ã«ã«åºå:
whosthere scan -t 5 --json --pretty > devices.json
HTTP APIãåããããŒã¢ã³ãšããŠå®è¡:
whosthere daemon --port=8080
远å ã®ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã¯ä»¥äžãå®è¡ããŠç¢ºèªã§ããŸã:
whosthere --help
ããŒãã€ã³ãïŒTUIïŒ
| ã㌠| ã¢ã¯ã·ã§ã³ |
|---|---|
/ | æ£èŠè¡šçŸæ€çŽ¢ãéå§ |
k | äž |
j | äž |
g | å é ãžç§»å |
G | æ«å°Ÿãžç§»å |
y | éžæããããã€ã¹ã®IPãã³ã㌠|
Y | éžæããããã€ã¹ã®MACãã³ã㌠|
enter | ããã€ã¹ã®è©³çްã衚瀺 |
CTRL+t | ããŒãã»ã¬ã¯ã¿ãŒãåãæ¿ã |
CTRL+i | ã€ã³ã¿ãŒãã§ãŒã¹ã»ã¬ã¯ã¿ãŒãåãæ¿ã |
CTRL+c/q | ã¢ããªã±ãŒã·ã§ã³ã忢 |
ESC | æ€çŽ¢ãã¯ãªã¢ / æ»ã |
p (詳现ãã¥ãŒ) | ããã€ã¹ã§ããŒãã¹ãã£ã³ãéå§ |
tab (ã¢ãŒãã«ãã¥ãŒ) | ãã¿ã³éžæãåãæ¿ã |
èšå®
Whosthereã¯è€æ°ã®èšå®æ¹æ³ããµããŒãããŠããã以äžã®åªå é äœïŒé«ãé ããäœãé ïŒããããŸã:
- ã³ãã³ãã©ã€ã³ãã©ã° - æåªå
ãå©çšå¯èœãªãã©ã°ã¯
whosthere --helpãåç §ããŠãã ããã - ç°å¢å€æ° -
WHOSTHERE__ããã¬ãã£ãã¯ã¹ãšããŠä»ããŸããç°å¢å€æ°ã«ããèšå®ãåç §ããŠãã ããã - èšå®ãã¡ã€ã« - YAMLèšå®ãã¡ã€ã«ãèšå®ãã¡ã€ã«ãåç §ããŠãã ããã
- ããã©ã«ãå€ - ãã©ãŒã«ããã¯ã®ããã©ã«ããconfig.goã®
DefaultConfig()ãåç §ããŠãã ããã
èšå®ãã¡ã€ã«
Whosthereã¯ä»¥äžã®é åºã§èšå®ãã¡ã€ã«ãæ¢ããæåã«èŠã€ãã£ããã®ã䜿çšããŸã:
--configãã©ã°ãŸãã¯WHOSTHERE_CONFIGç°å¢å€æ°ã§æå®ããããã¹$XDG_CONFIG_HOME/whosthere/config.yamlïŒXDG_CONFIG_HOMEãèšå®ãããŠããå ŽåïŒ~/.config/whosthere/config.yamlïŒããã©ã«ãã®å ŽæïŒ
èšå®äŸ:
# Uncomment the next line to configure a specific network interface - uses OS default if not set
# network_interface: eth0
# When enabled, devices from all network interfaces are shown and persist when switching interfaces
# Note: if two interfaces share the same subnet (e.g. both use 192.168.1.x), devices may get merged
# since they are identified by IP address. Use with caution on overlapping subnets.
all_interfaces: false
# Optional IPv4 CIDR subnets to sweep. When set, the sweeper skips the auto-detected interface subnet unless it is listed here.
# target_subnets: ["10.0.0.0/24", "10.0.1.0/24"]
# WARNING: scanning subnets larger than /16 sends packets to 65535+ IPs per subnet. Enable only if you understand the traffic implications. Consider using smaller /24 subnets for targeted scanning.
# scan_large_subnets: false
# How often to run discovery scans
scan_interval: 20s
# Maximum timeout for each scan, recommended to be less than the scan interval
scan_timeout: 10s
scanners:
mdns:
enabled: true
ssdp:
enabled: true
arp:
enabled: true
sweeper:
enabled: true
interval: 5m
timeout: 20s
port_scanner:
timeout: 5s
# List of TCP ports to scan on discovered devices
tcp: [21, 22, 23, 25, 80, 110, 135, 139, 143, 389, 443, 445, 993, 995, 1433, 1521, 3306, 3389, 5432, 5900, 8080, 8443, 9000, 9090, 9200, 9300, 10000, 27017]
splash:
enabled: true
delay: 1s
theme:
# When disabled, the TUI will use the terminal it's default ANSI colors
# Also see the NO_COLOR environment variable to completely disable ANSI colors
enabled: true
# See the complete list of available themes at https://github.com/ramonvermeulen/whosthere/tree/main/internal/ui/theme/theme.go
# Set name to "custom" to use the custom colors below
# For any color that is not configured it will take the default theme value as fallback
name: default
# Disable ANSI colors completely, overrides theme.enabled
# Can also be set via NO_COLOR or WHOSTHERE__THEME__NO_COLOR environment variables
# no_color: false
# Custom theme colors (uncomment and set name: custom to use)
# primitive_background_color: "#000a1a"
# contrast_background_color: "#001a33"
# more_contrast_background_color: "#003366"
# border_color: "#0088ff"
# title_color: "#00ffff"
# graphics_color: "#00ffaa"
# primary_text_color: "#cceeff"
# secondary_text_color: "#6699ff"
# tertiary_text_color: "#ffaa00"
# inverse_text_color: "#000a1a"
# contrast_secondary_text_color: "#88ddff"
ç°å¢å€æ°
äžè¬çãªç°å¢å€æ°
| 倿° | 説æ |
|---|---|
WHOSTHERE_CONFIG | èšå®ãã¡ã€ã«ãžã®ãã¹ãããã©ã«ãã®å Žæãäžæžãã§ããŸãã |
WHOSTHERE_LOG | ãã°ã¬ãã«ãèšå®ããŸãïŒäŸ: debugãinfoãwarnãerrorïŒãããã©ã«ãã¯infoã§ãã |
NO_COLOR | TUIã®ANSIã«ã©ãŒãç¡å¹ã«ããŸãã |
ç°å¢å€æ°ã«ããèšå®
YAMLèšå®ã§å©çšå¯èœãªãã¹ãŠã®èšå®ãªãã·ã§ã³ã¯ãWHOSTHERE__ãã¬ãã£ãã¯ã¹ïŒäºéã¢ã³ããŒã¹ã³ã¢ã«æ³šæïŒã䜿çšããŠç°å¢å€æ°ã§èšå®ã§ããŸãããã¹ããããèšå®ããŒã¯äºéã¢ã³ããŒã¹ã³ã¢ã§åºåãããããŒã¯å€§æåãšå°æåãåºå¥ããŸããã
äŸ: