lua-identd  Check-in [49a8f8643e]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed up README.md

Formatted to work with non-github-alike md.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:49a8f8643e480fc3bbdaf63a1b9bcd54a1edb786e15489a8338b588fb7df0bb5
User & Date: llmII 2018-07-03 14:40:49
Context
2018-07-03
14:41
More README.md fixes Leaf check-in: 5818549385 user: llmII tags: trunk
14:40
Fixed up README.md check-in: 49a8f8643e user: llmII tags: trunk
2018-06-22
20:46
Add license: check-in: 165a96e5ea user: llmII tags: trunk
Changes

Changes to README.md.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30









31
32






33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Why lua-identd?

Oidentd is complex. Identd is a protocol best relegated. The only
reason we still use either of these things is to keep "~" from
showing up in front of our ident on IRC. Oidentd had a bug on
FreeBSD that when it was built in one's own repos, vs utilized
from FreeBSD's quarterly branch repos, it could not service IPv6
appropriately. In the end, oidentd hasn't seen updates in years,
but it may have picked up development again recently. Even so,
why run something that does all the actual work of an identd,
when you aren't and shouldn't be using it for anything other than
IRC likely. If you're worrying with IRC and are using a
bouncer (likely ZNC), then why not have a program that'll run
alongside it and handle it for you, without doing all the real
checks behind the scenes.

Enter lua-identd. It's an identd written in lua for the express
purpose of integrating with ZNC. It might support other ways as
well in the future for those who wish to have something of the
sorts with their own ways of doing things than using a ZNC.

For now, it's a small, networked process, that should
be (hopefully) bug-free in regards to it's mandate, service ident
requests from IRC servers for your ZNC. It does not daemonize
itself. It is another program's responsibility to daemonize it.
The following should give an idea of it's useage. Don't look at
it as hard, the instructions below may seem lengthy but they are
fairly in depth. About half of it could be omitted as hand
holding or FAQ's. Let us know how it works for you (or doesn't)
by submitting a bug request or commenting on our "thanks for the









good work" issue.







# Setup instructions:

**This is designed to be ran as root. We encourage you to overview
the code and insure that it will not violate your machine.**

To get this running the following things will be needed:

* [penlight](https://github.com/stevedonovan/Penlight)
* [cqueues](https://25thandclement.com/~william/projects/cqueues.html)
* [lua (5.3)](https://www.lua.org/)

Optionally, to make the process easier, use [luarocks](https://luarocks.org/) to install
the formerly specified.

If you're running FreeBSD, you may need to manually install
cqueues like the following:

```
fetch https://github.com/wahern/cqueues/archive/rel-20171014.tar.gz
tar xvf rel-20171014.tar.gz
cd cqueues-rel-20171014
make all 5.3
make install
```

The cqueues example assumes a **root** user will run `make install`,
if not you'll need to do some edits to get it to install into a
different location. It does require the `gmake` program to be
installed `pkg install gmake`.

If you need to install luarocks from source, the following
directions are specific for FreeBSD and will only need slight
tweaking if you're using a Linux Distribution:

```
# if freebsd, use fetch, otherwise use wget
fetch https://github.com/luarocks/luarocks/archive/v2.4.4.tar.gz
tar xvf v2.4.4.tar.gz
cd luarocks-2.4.4
# change with-lua-include if using custom built lua and/or not on FreeBSD

./configure --with-lua-include=/usr/local/include/lua53
make build
make install
```

Once again, this assumes the `make install` step will be ran as
**root**, it's left up to the user to do differently if they wish to
have luarocks and/or cqueues not install system-wide.

If you're running FreeBSD you'll likely want to make use of the
program `daemon` that comes with FreeBSD. If you're running a
Linux Distribution you'll probably wish to attain software such
as `daemonize` which is of sorts like daemon. It is up to you to
create either a rc.conf, SysV init, OpenRC init, or systemd unit
file. For our purposes we'll assume a moderately featureful
version of cron and that you either have daemon, or daemonize and
use these in the stead of tying into a system init.

To run, if you used luarocks, you need to get luarocks to setup
your script, you'll need to use the actual locations of where you
placed lua-identd (lidentd.lua) and so forth (we'll use
`$lidentd_path` as the var for it):

```
luarocks path > ./start-lidentd.sh
echo $lua53_binary $lidentd_path >> ./start-lidentd.sh
```

Then crontab -e and add a (either daemonize or daemon) line to cron like so:


```
@reboot daemon $path/start-lidentd.sh
```

where `$path` evaluates to exactly where you stuck `./start-lidentd.sh`.

If you want PID files and/or Lock files etc, it's up to you to
read the documentation of "daemon" (FreeBSD), daemonize (Linux),
or whatever tool you deign to use for this purpose of starting
lua-identd at boot.

To setup the lua-identd program, just open it up, and look for
the "Configuration Below" and "Configuration ends here" lines,
all between it is for user editing. `idp` is where znc will place
it's ident lines (znc identfile module). `port` is the port that
it'll run on (if you wish to run it non-root you'll need to
configure port forwarding for IPv4 and IPv6 to a different
port). `address` defaults to "::" which is basically all IPv6 and
IPv4, which you should leave be unless you're using multiple znc
processes and thus need multiple lidentd processes to listen on
different addresses (which may indicate that you are absent of
the knowledge of znc's ability to connect to multiple networks
and support multiple users). `log_config` defines what `dir`
it'll log in, and what level's it'll log, and what level it'll
log to the logfile it'll manage, or print to screen.

To setup the ZNC, you'll need to do the following:

```
/msg *identfile setformat %ident%
/msg *identfile setfile /home/znc/.oidentd.conf
```

The selection of file names and so forth are completely arbitrary
and you are welcome to change things up as the system should be
flexible enough to handle differences. The location of the file
the lidentd software depends to have the related ident servicing
text that ZNC provides can be anywhere you choose. The log
locations for the lidentd software can go anywhere you choose.
Much of this is more example than absolute the final say so on
what to do to get up and running. Do customize this to how you
wish to run your system.

Remember, lua-identd is designed to be ran as root, anything
different and you've got some nice configuration to handle on
your own.



|
|
|
|
|
|
|
<
|
|
|
|


|
|
|

|
|
|
|
|
<
|
|
<
>
>
>
>
>
>
>
>
>
|

>
>
>
>
>
>


|
|







|
|

|
|

<
|
|
|
|
|
<






|
|
|

<
|
|
|
|
|
>
|
|
|
<






|
|
|
|
|
|
|

|
|
|
|

<
|
|
<

|
>

<
|
<



|
|
|
|

|
|
|
|
|
<
|
|
|
|
|
|
|
|



<
|
|
<

|
|
|
|
|
|
<
|
|

|
|
<
1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

62
63
64
65
66

67
68
69
70
71
72
73
74
75
76

77
78
79
80
81
82
83
84
85

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104

105
106

107
108
109
110

111

112
113
114
115
116
117
118
119
120
121
122
123
124

125
126
127
128
129
130
131
132
133
134
135

136
137

138
139
140
141
142
143
144

145
146
147
148
149

# Why lua-identd?

Oidentd is complex. Identd is a protocol best relegated. The only
reason we still use either of these things is to keep "~" from showing
up in front of our ident on IRC. Oidentd had a bug on FreeBSD that
when it was built in one's own repos, vs utilized from FreeBSD's
quarterly branch repos, it could not service IPv6 appropriately. In
the end, oidentd hasn't seen updates in years, but it may have picked
up development again recently. Even so, why run something that does
all the actual work of an identd, when you aren't and shouldn't be

using it for anything other than IRC likely. If you're worrying with
IRC and are using a bouncer (likely ZNC), then why not have a program
that'll run alongside it and handle it for you, without doing all the
real checks behind the scenes.

Enter lua-identd. It's an identd written in lua for the express
purpose of integrating with ZNC. It might support other ways as well
in the future for those who wish to have something of the sorts with
their own ways of doing things than using a ZNC.

For now, it's a small, networked process, that should be (hopefully)
bug-free in regards to it's mandate, service ident requests from IRC
servers for your ZNC. It does not daemonize itself. It is another
program's responsibility to daemonize it. The following should give an
idea of it's useage. Don't look at it as hard, the instructions below

may seem lengthy but they are fairly in depth. About half of it could
be omitted as hand holding or FAQ's. Let us know how it works for you

(or doesn't) by submitting a [bug request](https://code.amlegion.org/lua-identd/tktnew)
or commenting on our ["thanks for the good work" issue](https://code.amlegion.org/lua-identd/tktview?name=f52ff8c3e7).

# Getting the code

The current release is
[0.1.0](https://code.amlegion.org/lua-identd/info/46ec0dcf93ffd7b6).

You have a few options as to getting the code at the moment that will
work:

* [Tarball](https://code.amlegion.org/lua-identd/tarball/lidentd-46ec0dcf93.tar.gz?r=46ec0dcf93ffd7b6d1580396ffcd892931a493ea9e8655ffeac8ce3e74760681)
* [Single File](https://code.amlegion.org/lua-identd/raw/lidentd.lua?name=00b79a670a084b27e3fffb884a4293428733b04ebabbd22d4376d88cb05633b4)

We'd recommend using the Tarball, because in the future, it might
include some easy setup scripts per your OS.

# Setup instructions:

**This is designed to be ran as root. We encourage you to overview the
code and insure that it will not violate your machine.**

To get this running the following things will be needed:

* [penlight](https://github.com/stevedonovan/Penlight)
* [cqueues](https://25thandclement.com/~william/projects/cqueues.html)
* [lua (5.3)](https://www.lua.org/)

Optionally, to make the process easier, use
[luarocks](https://luarocks.org/) to install the formerly specified.

If you're running FreeBSD, you may need to manually install cqueues
like the following:


    fetch https://github.com/wahern/cqueues/archive/rel-20171014.tar.gz
    tar xvf rel-20171014.tar.gz
    cd cqueues-rel-20171014
    make all 5.3
    make install


The cqueues example assumes a **root** user will run `make install`,
if not you'll need to do some edits to get it to install into a
different location. It does require the `gmake` program to be
installed `pkg install gmake`.

If you need to install luarocks from source, the following directions
are specific for FreeBSD and will only need slight tweaking if you're
using a Linux Distribution:


    # if freebsd, use fetch, otherwise use wget
    fetch https://github.com/luarocks/luarocks/archive/v2.4.4.tar.gz
    tar xvf v2.4.4.tar.gz
    cd luarocks-2.4.4
    # change with-lua-include if using custom built lua and/or
    # not on FreeBSD
    ./configure --with-lua-include=/usr/local/include/lua53
    make build
    make install


Once again, this assumes the `make install` step will be ran as
**root**, it's left up to the user to do differently if they wish to
have luarocks and/or cqueues not install system-wide.

If you're running FreeBSD you'll likely want to make use of the
program `daemon` that comes with FreeBSD. If you're running a Linux
Distribution you'll probably wish to attain software such as
`daemonize` which is of sorts like daemon. It is up to you to create
either a rc.conf, SysV init, OpenRC init, or systemd unit file. For
our purposes we'll assume a moderately featureful version of cron and
that you either have daemon, or daemonize and use these in the stead
of tying into a system init.

To run, if you used luarocks, you need to get luarocks to setup your
script, you'll need to use the actual locations of where you placed
lua-identd (lidentd.lua) and so forth (we'll use `$lidentd_path` as
the var for it):


    luarocks path > ./start-lidentd.sh
    echo $lua53_binary $lidentd_path >> ./start-lidentd.sh


Then crontab -e and add a (either daemonize or daemon) line to cron
like so:


    @reboot daemon $path/start-lidentd.sh


where `$path` evaluates to exactly where you stuck `./start-lidentd.sh`.

If you want PID files and/or Lock files etc, it's up to you to read
the documentation of "daemon" (FreeBSD), daemonize (Linux), or
whatever tool you deign to use for this purpose of starting lua-identd
at boot.

To setup the lua-identd program, just open it up, and look for the
"Configuration Below" and "Configuration ends here" lines, all between
it is for user editing. `idp` is where znc will place it's ident lines
(znc identfile module). `port` is the port that it'll run on (if you
wish to run it non-root you'll need to configure port forwarding for

IPv4 and IPv6 to a different port). `address` defaults to "::" which
is basically all IPv6 and IPv4, which you should leave be unless
you're using multiple znc processes and thus need multiple lidentd
processes to listen on different addresses (which may indicate that
you are absent of the knowledge of znc's ability to connect to
multiple networks and support multiple users). `log_config` defines
what `dir` it'll log in, and what level's it'll log, and what level
it'll log to the logfile it'll manage, or print to screen.

To setup the ZNC, you'll need to do the following:


    /msg *identfile setformat %ident%
    /msg *identfile setfile /home/znc/.oidentd.conf


The selection of file names and so forth are completely arbitrary and
you are welcome to change things up as the system should be flexible
enough to handle differences. The location of the file the lidentd
software depends to have the related ident servicing text that ZNC
provides can be anywhere you choose. The log locations for the lidentd
software can go anywhere you choose. Much of this is more example than

absolute the final say so on what to do to get up and running. Do
customize this to how you wish to run your system.

Remember, lua-identd is designed to be ran as root, anything different
and you've got some nice configuration to handle on your own.