class SocksTunnel::Config

Attributes

daemon[RW]
local_server_host[RW]
local_server_port[RW]
password[RW]
remote_server_host[RW]
remote_server_port[RW]
salt[RW]

Public Class Methods

cipher() click to toggle source
# File lib/socks_tunnel/config.rb, line 32
def cipher
  @cipher ||= 'AES-256-CBC'
end
daemon?() click to toggle source
# File lib/socks_tunnel/config.rb, line 36
def daemon?
  !!@daemon
end
delimiter() click to toggle source
# File lib/socks_tunnel/config.rb, line 28
def delimiter
  @delimiter ||= '===SOCKSTUNNEL==='
end
from(options) click to toggle source
# File lib/socks_tunnel/config.rb, line 7
def from(options)
  if options[:remote_addr]
    @local_server_port = options[:port]
    @local_server_host = options[:host] if options[:host]
    @remote_server_host, @remote_server_port = options[:remote_addr].split(':')
  else
    @remote_server_port = options[:port]
  end
  @password = options[:password]
  @salt = options[:salt] if options[:salt]
  @daemon = options[:daemon] if options[:daemon]
end