diff --git a/demonstrated_images/Untitled (1).png b/demonstrated_images/Untitled (1).png new file mode 100644 index 00000000..e796201f Binary files /dev/null and b/demonstrated_images/Untitled (1).png differ diff --git a/demonstrated_images/Untitled (10).png b/demonstrated_images/Untitled (10).png new file mode 100644 index 00000000..cc6fbd41 Binary files /dev/null and b/demonstrated_images/Untitled (10).png differ diff --git a/demonstrated_images/Untitled (11).png b/demonstrated_images/Untitled (11).png new file mode 100644 index 00000000..e7270a94 Binary files /dev/null and b/demonstrated_images/Untitled (11).png differ diff --git a/demonstrated_images/Untitled (12).png b/demonstrated_images/Untitled (12).png new file mode 100644 index 00000000..9a1ba5ae Binary files /dev/null and b/demonstrated_images/Untitled (12).png differ diff --git a/demonstrated_images/Untitled (13).png b/demonstrated_images/Untitled (13).png new file mode 100644 index 00000000..2b5ed094 Binary files /dev/null and b/demonstrated_images/Untitled (13).png differ diff --git a/demonstrated_images/Untitled (14).png b/demonstrated_images/Untitled (14).png new file mode 100644 index 00000000..813913c5 Binary files /dev/null and b/demonstrated_images/Untitled (14).png differ diff --git a/demonstrated_images/Untitled (15).png b/demonstrated_images/Untitled (15).png new file mode 100644 index 00000000..a2924bcc Binary files /dev/null and b/demonstrated_images/Untitled (15).png differ diff --git a/demonstrated_images/Untitled (16).png b/demonstrated_images/Untitled (16).png new file mode 100644 index 00000000..ea530147 Binary files /dev/null and b/demonstrated_images/Untitled (16).png differ diff --git a/demonstrated_images/Untitled (17).png b/demonstrated_images/Untitled (17).png new file mode 100644 index 00000000..3e243c46 Binary files /dev/null and b/demonstrated_images/Untitled (17).png differ diff --git a/demonstrated_images/Untitled (18).png b/demonstrated_images/Untitled (18).png new file mode 100644 index 00000000..cf87b3c6 Binary files /dev/null and b/demonstrated_images/Untitled (18).png differ diff --git a/demonstrated_images/Untitled (19).png b/demonstrated_images/Untitled (19).png new file mode 100644 index 00000000..1c4d3531 Binary files /dev/null and b/demonstrated_images/Untitled (19).png differ diff --git a/demonstrated_images/Untitled (2).png b/demonstrated_images/Untitled (2).png new file mode 100644 index 00000000..ad8280bb Binary files /dev/null and b/demonstrated_images/Untitled (2).png differ diff --git a/demonstrated_images/Untitled (20).png b/demonstrated_images/Untitled (20).png new file mode 100644 index 00000000..e95bd448 Binary files /dev/null and b/demonstrated_images/Untitled (20).png differ diff --git a/demonstrated_images/Untitled (21).png b/demonstrated_images/Untitled (21).png new file mode 100644 index 00000000..42b33bae Binary files /dev/null and b/demonstrated_images/Untitled (21).png differ diff --git a/demonstrated_images/Untitled (22).png b/demonstrated_images/Untitled (22).png new file mode 100644 index 00000000..88a3e014 Binary files /dev/null and b/demonstrated_images/Untitled (22).png differ diff --git a/demonstrated_images/Untitled (3).png b/demonstrated_images/Untitled (3).png new file mode 100644 index 00000000..3745a6c7 Binary files /dev/null and b/demonstrated_images/Untitled (3).png differ diff --git a/demonstrated_images/Untitled (4).png b/demonstrated_images/Untitled (4).png new file mode 100644 index 00000000..590e04a9 Binary files /dev/null and b/demonstrated_images/Untitled (4).png differ diff --git a/demonstrated_images/Untitled (5).png b/demonstrated_images/Untitled (5).png new file mode 100644 index 00000000..fc27d4b7 Binary files /dev/null and b/demonstrated_images/Untitled (5).png differ diff --git a/demonstrated_images/Untitled (6).png b/demonstrated_images/Untitled (6).png new file mode 100644 index 00000000..aedbcdbb Binary files /dev/null and b/demonstrated_images/Untitled (6).png differ diff --git a/demonstrated_images/Untitled (7).png b/demonstrated_images/Untitled (7).png new file mode 100644 index 00000000..095cef1f Binary files /dev/null and b/demonstrated_images/Untitled (7).png differ diff --git a/demonstrated_images/Untitled (8).png b/demonstrated_images/Untitled (8).png new file mode 100644 index 00000000..5bacc56d Binary files /dev/null and b/demonstrated_images/Untitled (8).png differ diff --git a/demonstrated_images/Untitled (9).png b/demonstrated_images/Untitled (9).png new file mode 100644 index 00000000..853c573f Binary files /dev/null and b/demonstrated_images/Untitled (9).png differ diff --git a/demonstrated_images/Untitled.png b/demonstrated_images/Untitled.png new file mode 100644 index 00000000..46771333 Binary files /dev/null and b/demonstrated_images/Untitled.png differ diff --git a/demonstrated_readme/README.md b/demonstrated_readme/README.md new file mode 100644 index 00000000..aa5e9595 --- /dev/null +++ b/demonstrated_readme/README.md @@ -0,0 +1,159 @@ +# Expose local Port - > frp-demonstration + +Reference → [https://github.com/REZ-OAN/frp](https://github.com/REZ-OAN/frp) + +# Step-1 Go on your vm or bm + +Goto your server + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled.png) + +# Step-2 Download release and Extract It (on vm or bm) + +Download the latest release from the github repo + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(1).png) + +Select the one which meet your system architecture + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(2).png) + +Now hover on the file and `right click` on it select the `copy link address` + +Now `goto` the `terminal` where you `ssh` to the server + +go to preferred folder where you want to download the release + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(3).png) + +Now using `wget` download the release + +```bash +wget https://github.com/REZ-OAN/frp/releases/download/v0.57.0/frp_0.57.0_linux_amd64.tar.gz +``` + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(4).png) + +In this directory you will see like this + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(5).png) + +Now extract the `.tar.gz` file + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(6).png) + +Now `goto` `frp_0.57.0_linux_amd64/` this folder + +This files will be there + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(7).png) + +# Step-3 Running frp-server ( on vm or bm) + +Now edit the `frps.toml` because we will run the `frp-server` on our `vm` or `bm` + +We need to specify a `port` on our `vm` or `bm` on which the `frp-server`will listen to + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(8).png) + +Using `nano` edit the `bindPort` if you want to + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(9).png) + +I have edited the port number + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(10).png) + +Now run the server + +```bash +./frps -c ./frps.toml +``` + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(11).png) + +# Step-4 Running our codeserver-python (on local machine) + +First need to pull the image from the docker.hub + +```bash +docker pull poridhi/codeserver-python:v1.2 +``` + +Now, run this and copy the image id to run the image + +```bash +docker images +``` + +Run using below command + +```bash +docker run -it -p 5000:8080 b25217878034 +``` + +Your terminal will look like this + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(12).png) + +# Step-5 Running frp-client (on our local machine) + +Firstly do every thing in done in the **Step-2 ,** after doing all of those things + +Edit the `frpc.toml` + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(13).png) + +Here, `serverAddr` refers to the server from where you locally running service will be **exposed** + +And `serverPort` refers to the port where the`frp-server` is listening + +And `localPort` refers to the port in which our service is **running** + +And `remotePort` refers to the `port`in the `remoteServer` in which our service will be **exposed** to + +Edit the `serverPort` to `4848` and `localPort` to `5000` and set `remotePort` to `7050` using `nano` + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(14).png) + +Now run the `frp-client` + +```bash +./frpc -c ./frpc.toml +``` + +# Step-6 create tunnel on cloudflare and then expose the port + +Go to cloudflare dashboard select the `Zero Trust` + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(15).png) + +Then open networks drop down and select the tunnels + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(16).png) + +Now click on `create tunnel` + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(17).png) + +Select the recommended connector + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(18).png) + +Then click on `next` and then give a name i choose `test-frp` + +Now choose connector environment , i have chosen `docker` + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(19).png) + +Now copy the connector `command` and run it on `detach` mode on your `server` ( in our case 103.174.50.21) + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(20).png) + +Now select the domain and subdomain , and the url server `ip_address:remotePort` + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(21).png) + +Now hit the URL `test-frp.poridhi.io/?folder=/app/` will see + +![Untitled](https://github.com/REZ-OAN/frp/blob/frp-demonstration-with-cloudflare/demonstrated_images/Untitled%20(22).png) \ No newline at end of file