Skip to content

Commit 70fc9a1

Browse files
fix: Issue GerryFerdinandus#20 support ws:// and wss://
Just add these 2 items in the URL check
1 parent 5e7caaf commit 70fc9a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/code/main.pas

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,9 @@ procedure TFormTrackerModify.CheckedOnOffAllTrackers(Value: boolean);
10751075
function TFormTrackerModify.ValidTrackerURL(const TrackerURL: UTF8String): boolean;
10761076
begin
10771077
//TrackerURL should be cleanup with UTF8trim()
1078-
Result := (Pos('http://', TrackerURL) = 1) or (Pos('https://', TrackerURL) = 1) or
1079-
(Pos('udp://', TrackerURL) = 1);
1078+
Result := (Pos('http://', TrackerURL) = 1) or (Pos('https://', TrackerURL) = 1)
1079+
or (Pos('ws://', TrackerURL) = 1) or (Pos('wss://', TrackerURL) = 1)
1080+
or (Pos('udp://', TrackerURL) = 1);
10801081
end;
10811082

10821083
function TFormTrackerModify.CopyUserInputNewTrackersToList: boolean;

0 commit comments

Comments
 (0)