Project

netsoul

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Netsoul client and library for ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.13.7, ~> 1.13
~> 0
~> 3.5
>= 0.49.0, ~> 0.49
>= 0.9.11, ~> 0.9
 Project Readme

Netsoul-Ruby Gem Version Build Status Coverage Status

  • formerly libnetsoul-rb

This gem is a simple and efficient Netsoul client implementation written in Ruby. You can use it as a Ruby gem in order to implement your own Netsoul client or just use the provided Netsoul client.

[History]: 8 years after writing my first ruby lines of code, I decide to rewrite this old own with all my Ruby backgrounds. The old design was really bad.

Features

  • MD5 authentication
  • Kerberos (my own Ruby native extension) authentication. Something is wrong with kerberos server or gssapi [work in progress]
  • Data transfert is supported only for the library part, not the provided client, use it at your own. My academic account was closed when I tryed files transfert at school.
  • Identification Netsoul client is provided
  • Netsoul message library: all netsoul DSL is covered by the 'netsoul/message' module

Installation

On your desktop

gem install netsoul

In your project

Gemfile

gem 'netsoul', '~> 2.3.5'

project.rb

require 'netsoul'

Use the client

After installing the gem netsoul, call the client as described bellow.

Define at least two environment variables : NETSOUL_LOGIN and NETSOUL_SOCKS_PASSWORD (see the config for the complete list: https://github.com/fenicks/netsoul-ruby).

netsoul-ruby

or with a config file

netsoul-ruby -config netsoul-config.yml

Example of netsoul-config.yml file

Standard (MD5) authentication

:login: 'kakesa_c'
:socks_password: 'my socks password'
# :unix_password: 'unix password needed for kerberos authentication' # :auth_method must be set to :krb5
# :auth_method: :std # :std, :krb5
# :server_host: 'ns-server.epita.fr'
# :server_port: 4242
# :state: :none # :actif, :away, :connection, :idle, :lock, :server, :none
# :location: 'Home'
# :user_group: 'ETNA_2008'

Kerberos authentication

:login: 'kakesa_c'
:unix_password: 'unix password'
:auth_method: :krb5 # :std, :krb5
# :socks_password: 'my socks password'
# :server_host: 'ns-server.epita.fr'
# :server_port: 4242
# :state: :none # :actif, :away, :connection, :idle, :lock, :server, :none
# :location: 'Home'
# :user_group: 'ETNA_2008'

Build your own Netsoul client with netsoul-ruby gem

Look at the client implementation in this gem: https://github.com/fenicks/netsoul-ruby/blob/master/bin/netsoul-ruby. This client is implemented in less than 80 lines of code ; including option parser, client reconnection, ...

# Install the gem first (Gemfile or 'gem install'), see the 'Installation' section
require 'netsoul/client'

c = Netsoul::Client.new options[:user_opts_hash]
c.connect
# ...
if c.started
  # ...
  c.send str
  # ...
  msg = c.get
  #...
end
# ...
c.disconnect

Contributing

  1. Fork it ( https://github.com/fenicks/netsoul-ruby/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request