New script oidentd.py: mini RFC 1413 ident server integrated into WeeChat - #612
Open
TehPeGaSuS wants to merge 1 commit into
Open
New script oidentd.py: mini RFC 1413 ident server integrated into WeeChat#612TehPeGaSuS wants to merge 1 commit into
TehPeGaSuS wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Script info
oidentdconfigured withforce forward <listen_ip> <listen_port>to hand queries off to this scripthook_fd/hook_timer/hook_signal, available since early WeeChat 1.x)Description
Spins up a small RFC 1413 ident server integrated directly into WeeChat's event loop via
hook_fd(), instead of running a separate identd daemon that has no idea which local port belongs to which IRC server buffer.oidentdis configured to forward ident queries for a given listen address/port to this script (force forward 127.0.0.1 1113in/etc/oidentd.conf). The script answers each query with theirc.server.<name>.usernameof whichever server connection owns the queried local port.It resolves the local port -> server mapping two ways:
hdataright afterirc_server_connectingfires (before the query normally arrives), avoiding the race where the ident query lands before WeeChat has updated hdata with the new sockethdatawalk as a fallback/cache-populatorIncludes
/oidentd status|debug <server>|restartfor inspecting the listener state and the lport cache.Checklist (new script)
New script name.py: short description…hook_url,hook_processorhook_process_hashtableis used for any blocking call (N/A — all sockets are non-blocking and driven viahook_fd)