Last active
          February 18, 2024 21:23 
        
      - 
      
- 
        Save argami/f4ebf6025ea15460e2f7a68bccd12aca to your computer and use it in GitHub Desktop. 
Revisions
- 
        argami revised this gist May 6, 2023 . No changes.There are no files selected for viewing
- 
        argami renamed this gist May 4, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewingFile renamed without changes.
- 
        argami revised this gist May 4, 2023 . 2 changed files with 4 additions and 0 deletions.There are no files selected for viewingFile renamed without changes.This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,7 @@ To make a domain point to localhost we can use - dnsmasq ### For this you only need ~~2 steps~~ 1 step #### Only step @@ -20,6 +21,9 @@ First time will ask the pawssword to trust the cert. After that go fake domain `anysubdomain.lvh.me` and will be done!! Try also with several ones!! # Video [](https://www.youtube.com/watch?v=ff1JDa41tpc) --- 
- 
        argami revised this gist May 4, 2023 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,9 +9,6 @@ To make a domain point to localhost we can use - dnsmasq ### For this you only need ~~2 steps~~ 1 step #### Only step 
- 
        argami revised this gist May 4, 2023 . 1 changed file with 26 additions and 15 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Execute HTTPS proxy To Rails Apps in ~~2 Steps~~ 1 step ### Requirements - [Install caddy](https://caddyserver.com/docs/install#install) the easiest way to [download the binary](https://caddyserver.com/docs/install#static-binaries) @@ -8,37 +8,48 @@ To make a domain point to localhost we can use - hosts file (in mac iHost can be used for this) - dnsmasq ## Deprecated: ### For this you only need ~~2 steps~~ 1 step #### Only step ```shell caddy reverse-proxy --from anysubdomain.lvh.me --to :3000 --internal-certs ``` First time will ask the pawssword to trust the cert. After that go fake domain `anysubdomain.lvh.me` and will be done!! Try also with several ones!! --- # NOTE If you want to use it as service you can use the Caddyfile with your normal service manager. But if you only download the binary you can do ```shell caddy start --config Caddyfile ``` --- # The 2 step version is still valid #### First step: > This step is only needed once. Unless you dont remove the trusted CA Cert you will not have to do it again anymore. Trusting the CA Cert: ```shell sudo bash -c "caddy start && caddy trust && caddy stop" ``` #### Second step ```shell caddy reverse-proxy --from anysubdomain.lvh.me --to :3000 --internal-certs ``` 
- 
        argami revised this gist May 4, 2023 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ To make a domain point to localhost we can use #### First step ```shell caddy reverse-proxy --from anysubdomain.lvh.me --to :3000 --internal-certs ``` > lvh.me is a service that always returns 127.0.0.1 as the dns configuration domain and subdomain @@ -26,7 +26,7 @@ To avoid this we need: #### Second step: ```shell sudo bash -c "caddy start && caddy trust && caddy stop" ``` After this reload the browser and will be done!!! @@ -38,7 +38,7 @@ After this reload the browser and will be done!!! If you want to use it as service you can use the Caddyfile with your normal service manager. But if you only download the binary you can do ```shell caddy start --config Caddyfile ``` This will load caddy in bg and can be stopped with caddy stop. 
- 
        argami revised this gist Apr 29, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # Execute HTTPS proxy To Rails Apps in 2 Steps ### Requirements - [Install caddy](https://caddyserver.com/docs/install#install) the easiest way to [download the binary](https://caddyserver.com/docs/install#static-binaries) - Have a domain/subdomain that points to 127.0.0.1/0.0.0.0/localhost etc. To make a domain point to localhost we can use 
- 
        argami revised this gist Apr 28, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,4 @@ https:// { on_demand } reverse_proxy :3000 } 
- 
        argami revised this gist Apr 28, 2023 . 1 changed file with 13 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,4 +29,16 @@ To avoid this we need: sudo caddy trust ``` After this reload the browser and will be done!!! --- # NOTE If you want to use it as service you can use the Caddyfile with your normal service manager. But if you only download the binary you can do ```shell caddy start -config Caddyfile ``` This will load caddy in bg and can be stopped with caddy stop. 
- 
        argami revised this gist Apr 28, 2023 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ https:// { log tls internal { on_demand } reverse_proxy :3000 } 
- 
        argami created this gist Apr 28, 2023 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ # Execute HTTPS proxy To Rails Apps in 2 Steps ### Requirements - Install caddy - Have a domain/subdomain that points to 127.0.0.1/0.0.0.0/localhost etc. To make a domain point to localhost we can use - hosts file (in mac iHost can be used for this) - dnsmasq ### For this you only need 2 steps #### First step ```shell caddy reverse-proxy -from anysubdomain.lvh.me -to :3000 -internal-certs ``` > lvh.me is a service that always returns 127.0.0.1 as the dns configuration domain and subdomain When you execute this step and go to https://anysubdomain.lvh.me you will receive a  To avoid this we need: #### Second step: ```shell sudo caddy trust ``` After this reload the browser and will be done!!!