Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ircv3 WEBIRC command #546

Closed
jhthorsen opened this issue Jan 12, 2021 · 2 comments
Closed

Add support for ircv3 WEBIRC command #546

jhthorsen opened this issue Jan 12, 2021 · 2 comments
Assignees
Milestone

Comments

@jhthorsen
Copy link
Collaborator

Some Convos admins and IRC servers want to see the real IP of the user, and not the IP of where Convos is running.

https://ircv3.net/specs/extensions/webirc is a way to solve this issue, but there is a problem: Convos has persistent connections and since the WEBIRC command can only be sent when connecting, the IP will never get updated until the user actively reconnects.

@jhthorsen jhthorsen added this to the 5.xx milestone Jan 12, 2021
@jhthorsen jhthorsen self-assigned this Jan 12, 2021
@jhthorsen jhthorsen mentioned this issue Jan 12, 2021
18 tasks
jhthorsen pushed a commit that referenced this issue Jan 12, 2021
…#346 #444 #546

  This implementation allow a Convos admin to set an environment
  variable to enable WEBIRC. Example:

      #!/bin/sh
      export CONVOS_WEBIRC_PASSWORD_LOCALHOST=some_super_secret_password
      export CONVOS_WEBIRC_PASSWORD_MY_SERVER=some_super_secret_password
      ./script/convos daemon

  The part after "CONVOS_WEBIRC_PASSWORD_" is the connection ID, in
  upper case, without the "irc-" prefix and special characters (such as
  "-") translated into "_".

  Setting the environment variable will cause the following IRC commmand
  to be sent to the server:

      WEBIRC some_super_secret_password convos <hostname> <ip>

  "hostname" will fallback to "ip" if the IP could not resolved.

  IMPORTANT! The "ip" will only update after a USER has gone to the
  connection settings and hit "Update". The default "ip" (until a user
  have updated the settings) will be 127.0.0.1. Also, the "ip" will not
  get updated when the user change IP. It will only get updated when the
  user actively goes to the connection settings and hit "Update".
@jhthorsen
Copy link
Collaborator Author

jhthorsen commented Jan 12, 2021

From 1f9c23b:

Add EXPERIMENTAL support for https://ircv3.net/specs/extensions/webirc

This implementation allow a Convos admin to set an environment variable to enable WEBIRC. Example:

#!/bin/sh
export CONVOS_WEBIRC_PASSWORD_LOCALHOST=some_super_secret_password
export CONVOS_WEBIRC_PASSWORD_MY_SERVER=some_super_secret_password
./script/convos daemon

The part after "CONVOS_WEBIRC_PASSWORD_" is the connection ID, in upper case, without the "irc-" prefix and special characters (such as "-") translated into "_".

Setting the environment variable will cause the following IRC commmand to be sent to the server:

WEBIRC some_super_secret_password convos <hostname> <ip>

"hostname" will fallback to "ip" if the IP could not resolved.

IMPORTANT! The "ip" will only update after a USER has gone to the connection settings and hit "Update". The default "ip" (until a user have updated the settings) will be 127.0.0.1. Also, the "ip" will not get updated when the user change IP. It will only get updated when the user actively goes to the connection settings and hit "Update".

@jhthorsen
Copy link
Collaborator Author

Going to close this for now. Might get re-opened based on feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant