CauseFX 5 лет назад
Родитель
Сommit
882d96b2a7
2 измененных файлов с 32 добавлено и 0 удалено
  1. 2 0
      api/config/default.php
  2. 30 0
      api/homepage/nzbget.php

+ 2 - 0
api/config/default.php

@@ -94,6 +94,8 @@ return array(
 	'nzbgetURL' => '',
 	'nzbgetUsername' => '',
 	'nzbgetPassword' => '',
+	'nzbgetSocksEnabled' => false,
+	'nzbgetSocksAuth' => '999',
 	'nzbgetCombine' => false,
 	'transmissionURL' => '',
 	'transmissionUsername' => '',

+ 30 - 0
api/homepage/nzbget.php

@@ -53,6 +53,36 @@ trait NZBGetHomepageItem
 						'value' => $this->config['nzbgetPassword']
 					)
 				),
+				'API SOCKS' => array(
+					array(
+						'type' => 'html',
+						'override' => 12,
+						'label' => '',
+						'html' => '
+							<div class="panel panel-default">
+								<div class="panel-wrapper collapse in">
+									<div class="panel-body">
+										<h3 lang="en">Nzbget SOCKS API Connection</h3>
+										<p>Using this feature allows you to access the API without having to reverse proxy it.  Just access it from: </p>
+										<code>' . $this->getServerPath() . 'api/v2/socks/nzbget/</code>
+									</div>
+								</div>
+							</div>'
+					),
+					array(
+						'type' => 'switch',
+						'name' => 'nzbgetSocksEnabled',
+						'label' => 'Enable',
+						'value' => $this->config['nzbgetSocksEnabled']
+					),
+					array(
+						'type' => 'select',
+						'name' => 'nzbgetSocksAuth',
+						'label' => 'Minimum Authentication',
+						'value' => $this->config['nzbgetSocksAuth'],
+						'options' => $this->groupOptions
+					),
+				),
 				'Misc Options' => array(
 					array(
 						'type' => 'select',