Giter Club home page Giter Club logo

autonet's Introduction

$OpenBSD: README.template,v 1.5 2016/08/27 09:47:26 ajacoutot Exp $

+-------------------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
+-------------------------------------------------------------------------------

autonet is a simple wifi network chooser for OpenBSD.

Installation
============

Clone the repo as /usr/ports/mystuff/net/autonet. Then run:

    make install

Using autonet
=============

Run "autonet". autonet will scan for networks. If it sees one that
it recognizes, it will create the appropriate hostname.if(5) file
as a symlink into /etc/hostname.d (described below) and exec
/etc/netstart <ifname>.

autonet does not continuously monitor for network changes in the
background. It doesn't show you a list of networks and ask you to
pick one. It doesn't communicate over dbus. It has no runtime
configuration whatsoever -- if you want to add a new network, you
need to recompile it. You run it whenever you want to get onto a
known wireless network, it finds a network for you and connects to
it, and then it exits. If you're in a cafe and need to figure out
which network to connect to, just scan and configure with ifconfig(8).

Configuration
=============

Edit config.h and recompile.

autonet assumes that you have files under /etc/hostname.d that are
named like "<ifname>.<network-name>". There must be a corresponding
file for each NetPref defined in config.h, named for either the
filename or, if filename is NULL, the nwid. autonet doesn't check
this for you -- you have to do it yourself.

So for instance if you are using autonet on iwn0 and have a NetPref
with

    { .nwid = "attwifi", .filename = NULL },

there should be a file at /etc/hostname.d/iwn0.attwifi that contains
the hostname.if(5) configuration for the attwifi network. Likewise
if you have

    { .nwid = "whatever", .filename = "mynet" },

/etc/hostname.d/iwn0.mynet should contain the configuration for the
"whatever" network.

autonet looks for networks in the order they're defined in config.h.

Boot-time usage
---------------
autonet may be used to pick your computer's network on boot. A patch
that modifies /etc/rc to do this is included as rc-autonet.patch.

autonet's People

Contributors

mstevens 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

Watchers

 avatar  avatar  avatar

autonet's Issues

Make it a port

Seems like it'd be useful to have this in ports. I can't find an example of using BSD-style makefiles for a port though, and it doesn't quite work to do it the obvious way.

Clear more stuff on network switch

This issue would make autonet clear things like chan and wpakey in addition to BSSID when it switches to a new profile. My current workaround is to just put -wpakey in hostname.if(5) files for open networks, but if I ever manually configure a channel, what generally happens is I forget I've done this, get confused when I can't connect to a new network, reboot, and realize what I did after everything works.

Config-less mode

I could pay some complexity and remove the need to recompile autonet every time you create a new profile if I just parsed the hostname.if(5) files under /etc/hostname.d at runtime.

Unfortunately the only parser I can find for hostname.if(5) files is written in Bourne shell and named /etc/netstart. But I suppose it wouldn't be too bad to grep for "^nwid", "^bssid", etc. and parse those values. I wonder what happens if an nwid is quoted and contains a newline...

Makefile.inc is getting double-included

If I don't .include Makefile.inc, then it is included 0 times and thus things fail to compile. If I do .include it, then it is included twice. Things still compile, but all flags are passed twice.

Probably a result of abusing bsd.*.mk.

Support for multiple interfaces

Right now IFNAME is a preprocessor macro. This would make it a configurable option, allowing you to use autonet on multiple different interfaces.

I have never needed this. If you want it, say so in this issue.

Force profile

This would add a -p flag that would just force-connect to the named profile without bothering to do a scan. Could be useful for connecting to networks that don't advertise.

This is probably easily exploitable unless I sanity-check the input, and I've never needed it, but if you want it, say so here.

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.