fix: proxy check for ports, do not kill anything listening on port 80/443

This commit is contained in:
Andras Bacsai
2023-10-13 14:25:30 +02:00
parent 5aa8ccfcf4
commit 59eae3a44e
9 changed files with 152 additions and 72 deletions

View File

@@ -20,8 +20,9 @@
@endif
<x-forms.button isModal noStyle modalId="stopProxy"
class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24" stroke-width="2"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24"
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>
<path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>
@@ -30,7 +31,7 @@
</x-forms.button>
</div>
@else
<button wire:click='startProxy' onclick="startProxy.showModal()"
<button onclick="checkProxy()"
class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-warning" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
@@ -42,4 +43,13 @@
</button>
@endif
@endif
<script>
function checkProxy() {
Livewire.emit('checkProxy')
}
Livewire.on('proxyChecked', () => {
startProxy.showModal();
Livewire.emit('startProxy');
})
</script>
</div>