From 642d2803866979b4c9f2424eb248a303cbf2f223 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Wed, 3 Apr 2024 09:30:18 +0200 Subject: [PATCH 1/4] refs #6497:rdirect --- win/README.md | 18 ++++++++++++++++++ win/addRule.ps1 | 26 ++++++++++++++++++++++++++ win/powershellAddRule.lnk | Bin 0 -> 2708 bytes win/powershellRedirect.lnk | Bin 0 -> 3144 bytes win/redirect.ps1 | 5 +++++ 5 files changed, 49 insertions(+) create mode 100644 win/README.md create mode 100644 win/addRule.ps1 create mode 100644 win/powershellAddRule.lnk create mode 100644 win/powershellRedirect.lnk create mode 100644 win/redirect.ps1 diff --git a/win/README.md b/win/README.md new file mode 100644 index 000000000..4cdc43b2c --- /dev/null +++ b/win/README.md @@ -0,0 +1,18 @@ +# win + +In this folder, there are two scripts: +1- 'addRule' : adds a rule to the Windows firewall to accept requests on ports 3000 and 5000. +2- 'redirect' : allows redirecting ports 3000 and 5000 so that our machine processes them with our local Salix server. + + +## Run + +Two ways: + +1-Search the project of Salix in WSL with the explorer of windows, for example: \\wsl.localhost\Debian\home\your_user\projects\salix and with a terminal with administrator permissions execute addRule only one time and execute redirect.ps1 every time you need redirect ports. + +2-Search the project of Salix in WSL with the explorer of windows and edit the .lnk with the path of your installation of Salix. So , you will have a direct link for execute. + +## Server + +To access your Salix server, you can directly enter the IP or name of your computer along with the corresponding port \ No newline at end of file diff --git a/win/addRule.ps1 b/win/addRule.ps1 new file mode 100644 index 000000000..363f4fee4 --- /dev/null +++ b/win/addRule.ps1 @@ -0,0 +1,26 @@ +# Definir las propiedades de la nueva regla +# Define el nombre de la regla +$ruleName = "salixRule" + +# Define el perfil de la regla (Dominio, Privado, P�blico) +$profile = "Domain,Private,Public" + +# Define la acción (Permitir/Bloquear) +$action = "Allow" + +# Define el protocolo (TCP/UDP) +$protocol = "TCP" + +# Define el puerto local +$port = 3000, 5000 + +# Define una descripción (opcional) +$description = "Permitir tráfico HTTP.Frontend y backend Salix." + +# Crea la regla de firewall +New-NetFirewallRule -DisplayName $ruleName -Profile $profile -Action $action -Protocol $protocol -LocalPort $port -Description $description + +# Imprime un mensaje de confirmación +Write-Host "Regla de firewall creada exitosamente: $ruleName" + +pause diff --git a/win/powershellAddRule.lnk b/win/powershellAddRule.lnk new file mode 100644 index 0000000000000000000000000000000000000000..bb462149a5028d8930aead9e7facb65ec02842d3 GIT binary patch literal 2708 zcmds3Z){Ul6#sRi3=wIel8FdSla3kFx4uo>T%63cY@LC%P?Z<*7FgEGy0&ZGn{>l10PI`AIM@1%814g;~$I=;!OBp)Zclp?Xub+B>S}c za_&9%-qUk__ngyn??wPNXBm6ooY|vg!d(s*`Dea)X!q*vQ?{31Z|xX1rfh$nUuDiQ zeUB+=v*Zi?k}@aOgntN4x~?|F?eBhDjz@jIqYt9m-=G(SW|-%pnv-trYt@de@!n`U zYoG~>umIOT+Z)OT6WZaY6v}*Q+AB8KeBdy)B92}}kwz8V(CCk) zYHNVzS$fs=qPJ(M04UabW?>~F7^J>_#E?QQ_;XZnX5rl%y4+U48%}3qeUa{1GKpsk z7B06Xv{xI&g2P$L!sxZBBIIH71Tpl{ayP9e`GG-b&)E!X?+n?oOI3V8!z?@2NtTtg zv!|lcwu>4R@MmyRCr`rQwQD`iE@T9{A<&iBKn%2Hd0uuC+6fc?kXIBhl0)F8*-N*$ zX00t#Kx`BcD?~m(0#=i{NvlZWUm3k5X*)>{(p{vWXa6!gM=(Wl8KCE5mS320u`UkK zi*YyedEl5&g^Zb$2OS$?7~aT zzBoPJ3(1ru`7UOti&;HLRGrLKgEKE$xRYcAT>RYdGgovx$34j`gS^GCH#R zWp4+GF(1)5N=tTT`qPy1|Rmn~Nv-Y>qt<~aS)nOCC6 zf86wc`%Wsi36?BNNxaW<$BC2&G7rYN&c)JsG4p?)2QHhJM;PPH&gwm~kEc^3;mGg4 zPpACY*Lw2iSSzsGnpd)cd$5#C3+$2rz>wT`PI zQ%6#Bk}5g5%j?99+0L>TFuog}@$0QC?eEt<8 literal 0 HcmV?d00001 diff --git a/win/powershellRedirect.lnk b/win/powershellRedirect.lnk new file mode 100644 index 0000000000000000000000000000000000000000..e5cc78862d98f99708510ea1d7684a6dfef49236 GIT binary patch literal 3144 zcmds3e@xV682=oaV4~g$5t_+GJH$1PJ4hi4BM#wk2B&9oYsZwqCCAT;BMwHbBe8Y-#zd9ywCf5 zpXYg>_j#Z9SqDHD8^Inpqk81`Bu2qVeC_#1-dMJIQ1|M)1*L8NLEWw1rD~3mIf_%K z@rV2Q5wS>c{8HR+yq@LNfAnJ%p0HRBE=H;?%N=GKLpH&xCY7!qta_Aq>niF4e&k>- zX5;4R?Zp9mwQJvMGkLyM`X;N(eP%roEQ2(=S;JAd+~+Bu)U7@fTzJ(>8Yu~#;}G9 zh1IS%vqgg;b}9{BHwGtJ?od1Mpn;kzskMe5cnC#7oetN5Ry~@mW($xtL65eRMN{h8 z7N4YRq69Pe8)7MwJK^CKxvFxF@QLYuG2QHG_JF!H&&z7Ht5ezEnj(Vd$|i7I_0r8t zTdwnkE%t{kHq-KE0b{3la3kbFH}1CQWSAI(S~PljjwV_(Ig0L2-+Fp%jq+zX zUSafk>G3*9q|^{EXM`FV)h)EDjIrwHECu;oso@D2kq8?j#f=xZB5~y>u3=l1qzX!O zBadr-R1>eKoT+!{=HDLPG1--edK>9!AOEsahn(F5K!=IrMS`63JkA3}y-Th}looa8 znNJ*B-`*{2TL?V!4i`shHD$iWdf!S3P1P>1NsK&~_j~c@N6+qgufTe3!*xT-H)TN3Ri<3t2pjvK-!cq{mPf(J@EE!r1!+b zjo8c&_-c>*QfgQz}<{xAydEnJ<AcXk@$w;aRL6tf}7$u7kn7%ZQ5FttkG19RKhq~0`WjrV=;|c14lwU^K zb=1^=QwcOnpLGY6V*{5a5)P1vHiT?0V#Fkx${`h1C>B^)8BBJOy zrep0%C}Vo|;x8sKX;y+VRTw3G-R=G2G9Dr*Lj?&{d4eyHc@7~|0t!(jL?L3twoU3p zL3a?u=szu|25s0;aO8G>Oqc(q#9GoTgh6bPN+9&A8j&1)sixz#7T;*Cje{6+d8aG? z%XOKyo_}KAPin6{_cG~W@1=6$q&Zf?N`(# zxYxQxw1dWL2A+tk&HJ>?XFp=kF?VG*?|PJUspDWLT Date: Wed, 3 Apr 2024 09:31:15 +0200 Subject: [PATCH 2/4] refs #6497:redirect --- win/{README.md => Content.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename win/{README.md => Content.md} (100%) diff --git a/win/README.md b/win/Content.md similarity index 100% rename from win/README.md rename to win/Content.md From 53015d1c67eda14d54313160df7e2bd6b207c05a Mon Sep 17 00:00:00 2001 From: sergiodt Date: Wed, 3 Apr 2024 09:33:50 +0200 Subject: [PATCH 3/4] refs #6497:redirect --- win/Content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/Content.md b/win/Content.md index 4cdc43b2c..6a13c22e5 100644 --- a/win/Content.md +++ b/win/Content.md @@ -9,7 +9,7 @@ In this folder, there are two scripts: Two ways: -1-Search the project of Salix in WSL with the explorer of windows, for example: \\wsl.localhost\Debian\home\your_user\projects\salix and with a terminal with administrator permissions execute addRule only one time and execute redirect.ps1 every time you need redirect ports. +1-Search the project of Salix in WSL with the explorer of windows, for example: \\wsl.localhost\Debian\home\your_user\projects\salix and with a terminal Powershell with administrator permissions execute addRule.ps1 only one time and execute redirect.ps1 every time you need redirect ports. 2-Search the project of Salix in WSL with the explorer of windows and edit the .lnk with the path of your installation of Salix. So , you will have a direct link for execute. From 11991ed5a1b81d07e92d20ded12644ad8b692e99 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Wed, 3 Apr 2024 09:36:03 +0200 Subject: [PATCH 4/4] refs #6497:redirect --- win/Content.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/Content.md b/win/Content.md index 6a13c22e5..eea5b123c 100644 --- a/win/Content.md +++ b/win/Content.md @@ -9,9 +9,9 @@ In this folder, there are two scripts: Two ways: -1-Search the project of Salix in WSL with the explorer of windows, for example: \\wsl.localhost\Debian\home\your_user\projects\salix and with a terminal Powershell with administrator permissions execute addRule.ps1 only one time and execute redirect.ps1 every time you need redirect ports. +1-Search the project of Salix in WSL with the explorer of windows, for example: \\wsl.localhost\Debian\home\your_user\projects\salix and with a terminal Powershell with administrator permissions execute addRule.ps1 only one time and execute redirect.ps1 every time you need redirect ports when the project is running. -2-Search the project of Salix in WSL with the explorer of windows and edit the .lnk with the path of your installation of Salix. So , you will have a direct link for execute. +2-Search the project of Salix in WSL with the explorer of windows and edit the files with .lnk with the path of your installation of Salix. So , you will have a direct link for execute. ## Server