<% # Note that this file is not a valid *.html file! # It is intended to be a bottlepy - style template # used for the scripting part of TheOnionBox! tor = get('tor') if tor is None else tor hs_configs = tor.get_hidden_service_conf(None) # print(hs_configs) # print(tor.get_info('config/names')) hs_conf_params = [ 'HiddenServiceDir', 'HiddenServicePort', 'HiddenServiceVersion', 'HiddenServiceAuthorizeClient', 'HiddenServiceAllowUnknownPorts', 'HiddenServiceMaxStreams', 'HiddenServiceMaxStreamsCloseCircuit', 'HiddenServiceDirGroupReadable', 'HiddenServiceNumIntroductionPoints' ] %> % if hs_configs is not None and len(hs_configs) > 0: {{!header_row('Tor', 'Hidden Services', 'hiddenservice')}} % for hs_dir in hs_configs: % hs_conf = hs_configs[hs_dir]

Hidden Service Options

# HiddenServiceDir

{{hs_dir}}

% for param in hs_conf_params: % if param in hs_conf: % out = hs_conf[param] % if param == 'HiddenServicePort': % lines = out % out = '' % for line in lines: % if len(out) > 0: % out += '
' % end % out += '{} {}:{}'.format(line[0], line[1], line[2]) % end % end

# {{param}}

{{out}}

% end % end % end
% end