Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆


Subscribe to our mailing list

hector

A private group chat server for people you trust

Subscribe to updates I use hector


Statistics on hector

Number of watchers on Github 134
Number of open issues 1
Average time to close an issue 5 months
Main language Ruby
Average time to merge a PR 28 days
Open pull requests 0+
Closed pull requests 4+
Last commit over 5 years ago
Repo Created over 9 years ago
Repo Last Updated over 1 year ago
Size 590 KB
Organization / Authorsstephenson
Contributors7
Page Updated
Do you use hector? Leave a review!
View hector activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating hector for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Hector

Hector is a private group chat server for people you trust. It speaks a small subset of the IRC protocol and is written in Ruby with the EventMachine library.

Existing IRC servers are complex beasts. They're designed for large public networks that need to handle tens of thousands of concurrent connections. They're written in C so they're difficult to modify and often vulnerable to security exploits. Setting them up takes hours of configuration in special syntax and requires knowledge of jargon like jupe and O-line.

Worse, they're hampered by years of legacy decisions. Access control and permissions are handled by an arcane set of user and channel modes and commands, enforced by services bots that need to be maintained separately from the servers themselves. And servers are encumbered with controls for rate limiting and spam protection because they're intended for public use.

A private chat server for people you trust

Hector is different: it lets you create a private chat server for people you trust. It's designed for small groups of friends who are comfortable using IRC clients to talk to each other but don't want the administrative overhead of a public server.

Hector implements just enough of the IRC protocol that existing IRC clients can connect and chat. Unlike other servers, Hector has no bans, modes, ops, opers, or channel keys -- but you do need a user name and password to connect. So you either have full access, or you don't have any access at all.

There are no administrative commands built into Hector. You can grant or deny access to users with a simple command-line tool. If you need finer control over connections, use your operating system's firewall (or find better friends).

Modifying Hector is easy because it's written in Ruby. Implementing a new command is as simple as defining a method. Connecting Hector to your existing authentication system is straightforward too.

Supported commands

Hector supports a limited subset of IRC commands.

  • USER and PASS -- Authenticates you to the server. (Your client sends these as soon as it connects.)
  • NICK -- Sets your nickname.
  • JOIN -- Joins a channel.
  • PRIVMSG and NOTICE -- Sends a message to another nickname or channel.
  • TOPIC -- Changes or returns the topic of a channel.
  • NAMES -- Shows a list of which nicknames are on a channel.
  • WHO -- Like NAMES, but returns more information. (Your client probably sends this when it joins a channel.)
  • WHOIS -- Shows information about a nickname, including how long it has been connected.
  • PART -- Leaves a channel.
  • AWAY -- Marks or unmarks you as being away.
  • INVITE -- Invites another user to a channel.
  • PING -- (Your client uses this command to measure the speed of its connection to the server.)
  • QUIT -- Disconnects from the server.

Installation and usage

Install Hector with RubyGems and create your server:

$ gem install -r hector
$ hector setup myserver
...
$ cd myserver.hect

Set up your first user account:

myserver.hect$ hector identity remember sam
Enter password:

Start the Hector daemon:

myserver.hect$ hector daemon

By default, the server will listen at 0.0.0.0 (any IP address) on port 6767 for unencrypted clients and on 6868 for encrypted. These settings can be configured by modifying init.rb in your server's directory with any combination of the following:

Hector.server_address = "111.222.333.444"
Hector.port = 9000
Hector.ssl_port = 9001
Hector.ssl_certificate_path = Hector.root.join("config/hector.crt")
Hector.ssl_certificate_key_path = Hector.root.join("config/hector.key")

You can connect Hector to an existing authentication scheme by again modifying init.rb in your server's directory:

Hector::Identity.adapter = MyIdentityAdapter.new(...)

where MyIdentityAdapter is a class whose instances respond to authenticate(username, password, &block) and normalize(username). See lib/hector/yaml_identity_adapter.rb for an example.

If you require em-synchrony, Hector will start EventMachine's run loop using EventMachine.synchrony. Simply require "em-synchrony" somewhere in init.rb. (In an identity adapter, for example.)

License (MIT)

Copyright 2012 Sam Stephenson.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributors

hector open issues Ask a question     (View All Issues)
  • over 5 years permit no password
hector questions on Stackoverflow (View All Questions)
  • Hector inserting only part of the primary key
  • Rewriting Hector Mutation to Astyanax Mutation : Delete Operation
  • Hector: how to query parts of a Composite Type
  • Running mapreduce on Cassandra data using Hector
  • Hector Cassandra Data Retrieval
  • How to set consistency level of column family using either cassandra-cli OR Hector
  • Create a Composite Column in Cassandra using Hector Template
  • How to improve the performance of Cassandra-Hector Java application
  • Cassandra Hector : How to retrieve all keyrows value in family?
  • Cassandra Hector error on localhost : All host pools marked down. Retry burden pushed out to client
  • Using hector, how to delete a range of super columns?
  • Creating Hector cluster in Java
  • hector cassandra cluster error
  • How to invoke github (hector) code into another local project?
  • Cassandra : Like operator in Hector
  • Cassandra-Hector Single-Node Cluster HUnavailableException: : May not be enough replicas present to handle consistency level
  • Cassandra-Hector InvalidRequestException
  • using Cassandra 1.2.19 , Hector and cql3
  • How do I retrieve the name of the key column in a Cassandra keyspace/columnfamily using Hector?
  • Get data in a specific time interval from Cassandra DB using Hector Api
  • Unable to insert values in cassandra db using Hector
  • Using Hector with CQL3 in java
  • Cassandra-Hector-Scala:How can I get all row Composite key in column family?
  • Issue with Hector API and Cassandra database: Undocumented exception
  • how set time-to-live for column in Cassandra with Hector?
  • Hector - Insert row with composite key
  • Hector test example not working on Cassandra 0.7.4
  • issue while deleting columns in cassandra using hector api
  • Cassandra-1.1.6 and Hector-1.1.4 Api
  • Cassandra 2 Hector: range slice query on composite row key return empty rows
hector list of languages used
Other projects in Ruby