Windows Firewall fix

This commit is contained in:
polv committed 2026-03-05 18:10:18 +07:00
1 parent e435ad3a82
commit 4c2b14c2d8
2 files changed
+43 -1

No files matched your search

+36
View File
@@ -5,3 +5,39 @@ This template should help get you started developing with Tauri, React and Types
## Recommended IDE Setup ## Recommended IDE Setup
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
## Mobile development
### Windows Firewall
On Windows, the firewall cound be an issue. Try this:
**Quick test first — temporarily disable firewall**
If your phone can connect after disabling it, the firewall is confirmed as the cause.
**Proper fix — add a firewall rule (run PowerShell as Admin):**
```powershell
New-NetFirewallRule -DisplayName "Dev Server 1420" -Direction Inbound -Protocol TCP -LocalPort 1420 -Action Allow
```
**Or via GUI:**
1. Search → "Windows Defender Firewall with Advanced Security"
2. Inbound Rules → New Rule
3. Port → TCP → 1420 → Allow → All profiles → Save
**Also check if Windows marked your network as Public** (Public networks block most inbound connections):
```powershell
# Check current network profile
Get-NetConnectionProfile
```
If `NetworkCategory` shows `Public`, change it to `Private`:
```powershell
Set-NetConnectionProfile -Name "YOUR_NETWORK_NAME" -NetworkCategory Private
```
**Verify the port is actually listening on 0.0.0.0:**
```powershell
netstat -an | findstr 1420
```
You want to see `0.0.0.0:1420` — if it shows `127.0.0.1:1420` the server binding is still the problem.
+7 -1
View File
@@ -114,6 +114,8 @@ function SearchPage() {
} else { } else {
setEntries([...entries, ...result]); setEntries([...entries, ...result]);
} }
return result;
} }
const onEntriesScrollEnd: UIEventHandler = async ({ target }) => { const onEntriesScrollEnd: UIEventHandler = async ({ target }) => {
@@ -123,7 +125,11 @@ function SearchPage() {
if (scrollHeight - 20 > scrollTop + target.getBoundingClientRect().height) if (scrollHeight - 20 > scrollTop + target.getBoundingClientRect().height)
return; return;
await runSearch(false); const results = await runSearch(false);
if (!results?.length) {
target.style.paddingBottom = "50vh";
return;
}
setTimeout(() => { setTimeout(() => {
target.scrollTop = scrollTop + 100; target.scrollTop = scrollTop + 100;