Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1373, allows portless connections via proxies #1374

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/services/TransmissionRPC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ class TRPC {
this.options = {
host:'localhost',
path:'/transmission/rpc',
port:9091,
port:'',
https:false,
timeout:timeout
};

for (const [key, value] of Object.entries(options)) {
if(value!=""){
if(value != "" || key == "port"){
this.options[key]=value;
}
}
Expand Down Expand Up @@ -568,7 +568,11 @@ class TRPC {

getRequestUrl(): string {
let result = this.options.https ? "https":"http";
result += "://"+this.options.host+":"+this.options.port+this.options.path;
result += "://"+this.options.host;
if(this.options.port != ""){
result+=":"+this.options.port
}
result+=this.options.path;
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/ServerDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<ion-item>
<ion-label position="floating">{{ Locale.port }}</ion-label>
<ion-input v-model.number="newConf.port" type="number" placeholder="9091"></ion-input>
<ion-input v-model="newConf.port" placeholder="9091"></ion-input>
</ion-item>

<ion-item>
Expand Down