Skip to content

Commit 8df36c4

Browse files
Niluge-KiWicas--
authored andcommitted
[WebUI] Accept network interface name as well as IP address
Deluge & libtorrent actually accept both IP address and device/interface namesgq as listen_interface: 540d557 which patched ui/ console & gkt3, but not web, this fixes it. (Inspired by deluge-torrent#300) (Translation should be ok: this string already exists) Also, resync listen & outgoing widths: they hold the same data types. Closes: deluge-torrent#458
1 parent 40d4f7e commit 8df36c4

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
- Python 3.6 support removed (Python >= 3.7)
88

9+
### Web UI
10+
11+
- Accept network interface name in addition to IP adress in "Incoming Address"
12+
913
## 2.1.1 (2022-07-10)
1014

1115
### Core

deluge/ui/web/js/deluge-all/preferences/NetworkPage.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@
99
*/
1010
Ext.namespace('Deluge.preferences');
1111

12-
// custom Vtype for vtype:'IPAddress'
13-
Ext.apply(Ext.form.VTypes, {
14-
IPAddress: function (v) {
15-
return /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(v);
16-
},
17-
IPAddressText: 'Must be a numeric IP address',
18-
IPAddressMask: /[\d\.]/i,
19-
});
20-
2112
/**
2213
* @class Deluge.preferences.Network
2314
* @extends Ext.form.FormPanel
@@ -35,7 +26,7 @@ Deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, {
3526
fieldset = this.add({
3627
xtype: 'fieldset',
3728
border: false,
38-
title: _('Incoming Address'),
29+
title: _('Incoming Interface'),
3930
style: 'margin-bottom: 5px; padding-bottom: 0px;',
4031
autoHeight: true,
4132
labelWidth: 1,
@@ -48,7 +39,6 @@ Deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, {
4839
fieldLabel: '',
4940
labelSeparator: '',
5041
width: 200,
51-
vtype: 'IPAddress',
5242
})
5343
);
5444

@@ -110,7 +100,7 @@ Deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, {
110100
name: 'outgoing_interface',
111101
fieldLabel: '',
112102
labelSeparator: '',
113-
width: 40,
103+
width: 200,
114104
})
115105
);
116106

0 commit comments

Comments
 (0)