Skip to content

Commit

Permalink
Add option to disable open port check
Browse files Browse the repository at this point in the history
Closes #912
  • Loading branch information
theotherp committed Jan 10, 2024
1 parent bd08bda commit 658f755
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public class OpenPortProblemDetector implements ProblemDetector {
public void executeCheck() {
try {
final AuthType authType = configProvider.getBaseConfig().getAuth().getAuthType();
if (!configProvider.getBaseConfig().getMain().isCheckOpenPort()) {
logger.debug("Not checking for open port because check is disabled");
return;
}
if (authType != AuthType.NONE) {
logger.debug("Not checking for open port because auth method is {}", authType);
return;
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/resources/changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#@formatter:off
- version: "v5.3.7"
changes:
- type: "feature"
text: "Add option to disable open port check. See #912"
- type: "fix"
text: "Fix filtering of history by time. See #913"
final: true
Expand Down
10 changes: 10 additions & 0 deletions core/src/main/resources/static/js/nzbhydra.js
Original file line number Diff line number Diff line change
Expand Up @@ -6692,6 +6692,16 @@ function ConfigFields($injector) {
advanced: true
}
},
{
key: 'checkOpenPort',
type: 'horizontalSwitch',
templateOptions: {
type: 'switch',
label: 'Check for open port',
help: "Check if NZBHydra is reachable from the internet and not protected",
advanced: true
}
},
{
key: 'xmx',
type: 'horizontalInput',
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/static/js/nzbhydra.js.map

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions core/ui-src/js/config/config-fields-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,16 @@ function ConfigFields($injector) {
advanced: true
}
},
{
key: 'checkOpenPort',
type: 'horizontalSwitch',
templateOptions: {
type: 'switch',
label: 'Check for open port',
help: "Check if NZBHydra is reachable from the internet and not protected",
advanced: true
}
},
{
key: 'xmx',
type: 'horizontalInput',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public class MainConfig {
//Startup / GUI settings
private boolean showNews = true;
private boolean startupBrowser = true;
private boolean checkOpenPort = true;
private boolean welcomeShown = false;
protected String theme;

Expand Down

0 comments on commit 658f755

Please sign in to comment.