Adding extra parameters to NNTP Server config

Want something added? Ask for it here.
Post Reply
f00b4r
Newbie
Newbie
Posts: 8
Joined: February 21st, 2010, 4:00 pm

Adding extra parameters to NNTP Server config

Post by f00b4r »

Hi all,

I'm looking for a way to add extra parameters in the "Server" section of the config, but more importantly being able to use them in the program. This is related to this topic : http://forums.sabnzbd.org/http://forums ... 589#p37589.

So far I have been able modify smpl template to add (and hide in my case) fields and write them in the config :
In config.py, line 336

Code: Select all

self.socks_host = OptionStr(name, 'socks_host','proxy.example.com',add=False)
self.socks_port = OptionNumber(name, 'socks_port',80,add=False)
self.socks_login = OptionStr(name, 'socks_login','login',add=False)
self.socks_password = OptionStr(name, 'socks_password','password',add=False)
interfaces/smpl/templates/config_server.tmpl :

Code: Select all

<div class="server">
  <form class="cmxform" id="$servers[$server]['host']$servers[$server]['port']" autocomplete="off">
    <fieldset class="EntryFieldSet">
    <legend>Giganews SSL</legend>
        <hr />
		<input type="hidden" name="host" value="$servers[$server]['host']">
		<input type="hidden" name="port" value="$servers[$server]['port']">
		<input type="hidden" name="username" value="$servers[$server]['username']">
		<input type="hidden" name="password" value="$servers[$server]['password']">
		<input type="hidden" name="timeout" value="$servers[$server]['timeout']">
                        <br class="clear" />
		<label class="label">$T('srv-connections'):</label><input type="text" size="25" name="connections" value="$servers[$server]['connections']">
			<input type="hidden" name="ssl" value="1"/>
			<input type="hidden" name="fillserver" value="0"/>
			<input type="hidden" name="optional" value="0"/>
                        <br class="clear" />
 <label class="label">Proxy:</label><input type="text" name="socks_host" value="$servers[$server]['socks_host']" ></label>
            <br class="clear" />
        <label class="label">Port:</label><input type="text" name="socks_port" value="$servers[$server]['socks_port']" ></label>
                    <br class="clear" />
        <label class="label">Login:</label><input type="text" name="socks_login" value="$servers[$server]['socks_login']" ></label>
                    <br class="clear" />
        <label class="label">Password:</label><input type="password" name="socks_password" value="$servers[$server]['socks_password']" ></label>
                    <br class="clear" />
        <div id="$servers[$server]['host']$servers[$server]['port']-result" class="server-test">$T('srv-testHint')</div>
                <input type="hidden" name="server" value="$server">

        <p><input type="button" class="submitindent" size="40" value="$T('button-saveChanges')" onclick="javascript:submitconfig('config/server/saveServer',this,'$servers[$server]['host']$servers[$server]['port']')">
                <br class="clear" />
<input type="button" class="submitindent" size="40" value="$T('button-testServer')" onclick="javascript:testServer('$servers[$server]['host']$servers[$server]['port']')">
I'm stuck on how to use these parameters in newswrapper.py for socks connection (cf. http://forums.sabnzbd.org/http://forums ... 589#p37589).

Thanks  :)
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: Adding extra parameters to NNTP Server config

Post by sander »

I can't answer your question, but I do have a question for you: where do you use SOCKS? I would say only behind corporate proxies / firewalls. Is there any other use for SOCKS?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
f00b4r
Newbie
Newbie
Posts: 8
Joined: February 21st, 2010, 4:00 pm

Re: Adding extra parameters to NNTP Server config

Post by f00b4r »

Yes, SOCKS is a proxy protocol. I use it behind a firewall indeed.
Last edited by f00b4r on January 13th, 2011, 2:52 pm, edited 1 time in total.
Post Reply