aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2023-02-03 15:19:07 -0600
committerGitHub <noreply@github.com>2023-02-03 15:19:07 -0600
commit9ee5accfcd65f98923724da3809cbcc8d5163061 (patch)
tree1d329879f57f68259c0af92ecd8b73fca6d27f1b
parent3162a3f7964e924372a7744f4ce02951894dfe38 (diff)
downloadslskd-9ee5accfcd65f98923724da3809cbcc8d5163061.tar.gz
Revert "Change default ports for HTTP, HTTPS, and Soulseek to 5030, 5031, and 50300, respectively"
-rw-r--r--Dockerfile6
-rw-r--r--README.md14
-rwxr-xr-xbin/run2
-rw-r--r--config/slskd.example.yml6
-rw-r--r--docs/config.md12
-rw-r--r--docs/docker.md18
-rw-r--r--docs/relay.md6
-rw-r--r--docs/reverse_proxy.md4
-rw-r--r--src/slskd/Core/Options.cs6
-rw-r--r--src/slskd/Program.cs2
-rw-r--r--src/slskd/Properties/launchSettings.json2
-rw-r--r--src/web/src/config.js3
12 files changed, 40 insertions, 41 deletions
diff --git a/Dockerfile b/Dockerfile
index 5f4f34eb..a54b74bf 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -55,9 +55,9 @@ ENV DOTNET_BUNDLE_EXTRACT_BASE_DIR=/var/tmp/.net \
DOTNET_gcConcurrent=1 \
DOTNET_GCHeapHardLimit=1F400000 \
DOTNET_GCConserveMemory=9 \
- SLSKD_HTTP_PORT=5030 \
- SLSKD_HTTPS_PORT=5031 \
- SLSKD_SLSK_LISTEN_PORT=50300 \
+ SLSKD_HTTP_PORT=5000 \
+ SLSKD_HTTPS_PORT=5001 \
+ SLSKD_SLSK_LISTEN_PORT=50000 \
SLSKD_APP_DIR=/app \
SLSKD_DOCKER_TAG=$TAG \
SLSKD_DOCKER_VERSION=$VERSION \
diff --git a/README.md b/README.md
index 56b371cc..fa38779f 100644
--- a/README.md
+++ b/README.md
@@ -47,9 +47,9 @@ New features are added all the time!
```shell
docker run -d \
- -p 5030:5030 \
- -p 5031:5031 \
- -p 50300:50300 \
+ -p 5000:5000 \
+ -p 5001:5001 \
+ -p 50000:50000 \
-v <path/to/application/data>:/app \
--name slskd \
slskd/slskd:latest
@@ -65,15 +65,15 @@ services:
image: slskd/slskd
container_name: slskd
ports:
- - "5030:5030"
- - "5031:5031"
- - "50300:50300"
+ - "5000:5000"
+ - "5001:5001"
+ - "50000:50000"
volumes:
- <path/to/application/data>:/app
restart: always
```
-This command or docker-compose file (depending on your choice) starts a container instance of slskd on ports 5030 (HTTP) and 5031 (HTTPS using a self-signed certificate). slskd begins listening for incoming connections on port 50300 and maps the application directory to the provided path.
+This command or docker-compose file (depending on your choice) starts a container instance of slskd on ports 5000 (HTTP) and 5001 (HTTPS using a self-signed certificate). slskd begins listening for incoming connections on port 50000 and maps the application directory to the provided path.
You can find a more in-depth guide to running slskd in Docker [here](https://github.com/slskd/slskd/blob/master/docs/docker.md).
diff --git a/bin/run b/bin/run
index c62e36df..dced97a1 100755
--- a/bin/run
+++ b/bin/run
@@ -4,7 +4,7 @@ if [ -z "$1" ]; then
fi
docker run -i \
- -p 5030:5030 \
+ -p 5000:5000 \
-p $SLSK_LISTEN_PORT:$SLSK_LISTEN_PORT \
-v $SLSK_OUTPUT_DIR:/var/slsk/download \
-v $SLSK_SHARED_DIR:/var/slsk/shared \
diff --git a/config/slskd.example.yml b/config/slskd.example.yml
index f58e2f6e..e2e3a812 100644
--- a/config/slskd.example.yml
+++ b/config/slskd.example.yml
@@ -82,10 +82,10 @@
# request:
# - ^.{1,2}$
# web:
-# port: 5030
+# port: 5000
# https:
# disabled: false
-# port: 5031
+# port: 5001
# force: false
# certificate:
# pfx: ~
@@ -121,7 +121,7 @@
# password: ~
# description: |
# A slskd user. https://github.com/slskd/slskd
-# listen_port: 50300
+# listen_port: 50000
# diagnostic_level: Info
# distributed_network:
# disabled: false
diff --git a/docs/config.md b/docs/config.md
index cd68c45a..b3cf6aeb 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -244,7 +244,7 @@ relay:
enabled: true
mode: agent
controller:
- address: https://my_cloud_server.example.com:5031
+ address: https://my_cloud_server.example.com:5001
ignore_certificate_errors: true
api_key: <a valid API key for the controller instance>
secret: <a secret value that matches the controller for this instance>
@@ -477,7 +477,7 @@ Symptoms of a misconfigured listen port include poor search results and the inab
#### **YAML**
```yaml
soulseek:
- listen_port: 50300
+ listen_port: 50000
```
## Other
@@ -588,7 +588,7 @@ soulseek:
## Basic
-The default HTTP listen port is 5030, but can be anything between 1 and 65535.
+The default HTTP listen port is 5000, typical for a .NET application, but can be anything between 1 and 65535.
The URL base option allows the application to operate behind a reverse proxy. Setting a base of "slskd" would make the web UI accessible at `http://<host>:<port>/slskd`.
@@ -606,7 +606,7 @@ Logging of HTTP requests is disabled by default.
#### **YAML**
```yaml
web:
- port: 5030
+ port: 5000
url_base: /
content_path: wwwroot
logging: false
@@ -614,7 +614,7 @@ web:
## HTTPS
-The default HTTPS port is 5031, but can be anything between 1 and 65535.
+The default HTTPS port is 5001, typical for a .NET application but can be anything between 1 and 65535.
By default, the application generates a new, self-signed X509 certificate at each startup. If, for whatever reason, a self-signed certificate isn't sufficient, or if the certificate needs to be shared among systems or applications, a certificate `.pfx` and password can be defined.
@@ -632,7 +632,7 @@ The application can produce a self-signed `.pfx` file and random password using
```yaml
web:
https:
- port: 5031
+ port: 5001
force: false
certificate:
pfx: ~
diff --git a/docs/docker.md b/docs/docker.md
index 8aecf2f9..e5e78251 100644
--- a/docs/docker.md
+++ b/docs/docker.md
@@ -4,9 +4,9 @@ For most users, a quick start will be all that is needed:
```shell
docker run -d \
- -p 5030:5030 \
- -p 5031:5031 \
- -p 50300:50300 \
+ -p 5000:5000 \
+ -p 5001:5001 \
+ -p 50000:50000 \
-v <path/to/application/data>:/app \
--name slskd \
slskd/slskd:latest
@@ -22,9 +22,9 @@ For this scenario, the `docker run` command would be:
```shell
docker run -d \
- -p 5030:5030 \
- -p 5031:5031 \
- -p 50300:50300 \
+ -p 5000:5000 \
+ -p 5001:5001 \
+ -p 50000:50000 \
-v /var/slskd:/app \
-v /home/JohnDoe/Music:/music \
-v /home/JohnDoe/eBooks:/ebooks \
@@ -45,9 +45,9 @@ You can achieve the same configuration by setting the `SLSKD_SHARED_DIR` environ
```shell
docker run -d \
- -p 5030:5030 \
- -p 5031:5031 \
- -p 50300:50300 \
+ -p 5000:5000 \
+ -p 5001:5001 \
+ -p 50000:50000 \
-v /var/slskd:/app \
-v /home/JohnDoe/Music:/music \
-v /home/JohnDoe/eBooks:/ebooks \
diff --git a/docs/relay.md b/docs/relay.md
index c1f09b4a..04e5915f 100644
--- a/docs/relay.md
+++ b/docs/relay.md
@@ -109,7 +109,7 @@ We'll start the controller instance, which, in my case, is running on a machine
Finally, we'll configure the agent. We'll enable the Relay, set this instance's mode to `agent`, and fill in the details of or controller.
-The controller is running on a machine with IP address 192.168.1.53, and we want to use HTTPS, so we'll use the URL `https://192.168.1.53:5031`. We're using the default self-signed certificate, so we'll need to `ignore_certificate_errors`.
+The controller is running on a machine with IP address 192.168.1.53, and we want to use HTTPS, so we'll use the URL `https://192.168.1.53:5001`. We're using the default self-signed certificate, so we'll need to `ignore_certificate_errors`.
We'll copy the API key and secret from the controller config, and lastly, we want the agent to receive the files downloaded by the controller, so we'll set `downloads` to `true`.
@@ -125,7 +125,7 @@ relay:
enabled: true
mode: agent
controller:
- address: https://192.168.1.241:5031
+ address: https://192.168.1.241:5001
ignore_certificate_errors: true
api_key: 9tWy5c3NrmekKVWLQXBztz0hY7rNGlj1tGMfvHKmU1q
secret: BgI04SuVtsAYipxPHDpdxJsnVoPEeq4tKJeorWxr3Pj
@@ -139,7 +139,7 @@ We'll start the agent and confirm that it connects to the controller and uploads
```
[18:50:08 INF] Running in Agent relay mode; not connecting to the Soulseek server.
-[18:50:08 INF] Attempting to connect to the relay controller https://192.168.1.241:5031
+[18:50:08 INF] Attempting to connect to the relay controller https://192.168.1.241:5001
[18:50:09 INF] Relay controller connection established. Awaiting authentication...
[18:50:09 INF] Authenticated. Uploading shares...
[18:50:09 INF] Beginning upload of shares (48.0 KB)
diff --git a/docs/reverse_proxy.md b/docs/reverse_proxy.md
index c1992fb5..d52ceb40 100644
--- a/docs/reverse_proxy.md
+++ b/docs/reverse_proxy.md
@@ -15,7 +15,7 @@ server {
listen 8080;
location /slskd {
- proxy_pass http://localhost:5030;
+ proxy_pass http://localhost:5000;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
@@ -32,7 +32,7 @@ server {
listen 8080;
location / {
- proxy_pass http://localhost:5030;
+ proxy_pass http://localhost:5000;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs
index c9b46239..05331cd4 100644
--- a/src/slskd/Core/Options.cs
+++ b/src/slskd/Core/Options.cs
@@ -1127,7 +1127,7 @@ namespace slskd
[EnvironmentVariable("SLSK_LISTEN_PORT")]
[Description("port on which to listen for incoming connections")]
[Range(1024, 65535)]
- public int ListenPort { get; init; } = 50300;
+ public int ListenPort { get; init; } = 50000;
/// <summary>
/// Gets the minimum diagnostic level.
@@ -1366,7 +1366,7 @@ namespace slskd
[Description("HTTP listen port for web UI")]
[Range(1, 65535)]
[RequiresRestart]
- public int Port { get; init; } = 5030;
+ public int Port { get; init; } = 5000;
/// <summary>
/// Gets HTTPS options.
@@ -1557,7 +1557,7 @@ namespace slskd
[Description("HTTPS listen port for web UI")]
[Range(1, 65535)]
[RequiresRestart]
- public int Port { get; init; } = 5031;
+ public int Port { get; init; } = 5001;
/// <summary>
/// Gets a value indicating whether HTTP requests should be redirected to HTTPS.
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index 65a42522..5d7c37e1 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -815,7 +815,7 @@ namespace slskd
// prepend the url base.
app.UsePathBase(urlBase);
app.UseHTMLRewrite("((\\.)?\\/static)", $"{(urlBase == "/" ? string.Empty : urlBase)}/static");
- app.UseHTMLInjection($"<script>window.urlBase=\"{urlBase};window.port={OptionsAtStartup.Web.Port}=\"</script>", excludedRoutes: new[] { "/api", "/swagger" });
+ app.UseHTMLInjection($"<script>window.urlBase=\"{urlBase}\"</script>", excludedRoutes: new[] { "/api", "/swagger" });
Log.Information("Using base url {UrlBase}", urlBase);
// serve static content from the configured path
diff --git a/src/slskd/Properties/launchSettings.json b/src/slskd/Properties/launchSettings.json
index 04eb101f..b151b2f4 100644
--- a/src/slskd/Properties/launchSettings.json
+++ b/src/slskd/Properties/launchSettings.json
@@ -5,7 +5,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
- "applicationUrl": "https://localhost:5031;http://localhost:5030"
+ "applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
} \ No newline at end of file
diff --git a/src/web/src/config.js b/src/web/src/config.js
index 9dc19b5c..1cec9668 100644
--- a/src/web/src/config.js
+++ b/src/web/src/config.js
@@ -1,6 +1,5 @@
const urlBase = (window.urlBase === '/' ? '' : window.urlBase) || '';
-const devPort = window.port ?? 5030;
-const rootUrl = process.env.NODE_ENV === 'production' ? urlBase : `http://localhost:${devPort}${urlBase}`;
+const rootUrl = process.env.NODE_ENV === 'production' ? urlBase : `http://localhost:5000${urlBase}`;
const apiBaseUrl = `${rootUrl}/api/v0`;
const hubBaseUrl = `${rootUrl}/hub`;
const tokenKey = 'slskd-token';