Skip to content

Commit

Permalink
portFix
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Mar 6, 2024
1 parent 3db4d1b commit 8c03793
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/hooks/useIPScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ export const useIPScanner = ({ allIps }: IPScannerProps) => {

dispatch(newState);
try {

const axiosInstance = axiosWithSNI(url, state.sniValue, controller.signal, timeout);
const response = await axiosInstance.get(path);
testCount++;
Expand Down
7 changes: 5 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ const Home: NextPage = () => {
id="sni"
value={sniValue}
onChange={(e) =>
setSettings({ sniValue: (e.target.value).replace(/^(https?:\/\/)?/, '') })
setSettings({
sniValue: (e.target.value).replace(/^(https?:\/\/)?/, '').replace(' ', '').trim(),
portValue: (e.target.value !== "" ? portValue : 80)
})
}
disabled={isRunning}
className="form-control dirLeft"
Expand All @@ -169,7 +172,7 @@ const Home: NextPage = () => {
<input
type="number"
id="max-latency"
value={(sniValue !== "" ? portValue : 80)}
value={portValue}
disabled={isRunning}
onChange={(e) =>
setSettings({ portValue: e.target.valueAsNumber })
Expand Down

0 comments on commit 8c03793

Please sign in to comment.