1
0
mirror of https://code.semirocket.science/wrapsix synced 2024-09-19 23:11:04 +03:00
wrapsix/lib/wrapper.rb
xHire c894b7186c Integrated wrapper into WrapSix
Fixed bug in resolver so now even normal applications accept its answers
Improved configuration - now accepts arguments from command line
Cleaned the code a little bit
Added simple build script
Written more documentation into README
Chosen the licence - GNU AGPLv3
2009-01-14 23:05:12 +01:00

28 lines
476 B
Ruby

#####
## WrapSix
###
#> lib/wrapper.rb
#~ WrapSix Wrapper
####
# Author: Michal Zima, 2008-2009
# E-mail: xhire@tuxportal.cz
#####
class Wrapper
def initializer
@debug = $config['debug']
end
def start
params = "#{$config['wrapper_ipv4_address']} #{$config['wrapper_ipv6_prefix']}"
params += " #{$config['wrapper_device']}" if $config['wrapper_device']
unless @debug
params += " > /dev/null"
end
system "wrapper/wrapper #{params}"
end
def exit
end
end