Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove vendor folder #4

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Next Next commit
Shubh_gPRS-Model
  • Loading branch information
“Shubham_Prajapati” committed Sep 26, 2022
commit a38c7fc1b16a45a35bd35d9e4f4c4cdf225fffca
4 changes: 2 additions & 2 deletions .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ PORT = 9080
APP_CONF_DIR = ./conf

# Caddy Specifications
CADDY_CONF_DIR = /etc/caddy
CADDY_CONF_DIR = /home/shubham/Lazarus_Network/TunnelNode/Caddy
CADDY_INTERFACE_NAME = Caddyfile
CADDY_DOMAIN = webtun.mydomain.com
CADDY_UPPER_RANGE = 9000
CADDY_LOWER_RANGE = 8000

# NGINX Specifications
NGINX_CONF_DIR = /etc/nginx
NGINX_CONF_DIR = /home/shubham/Lazarus_Network/TunnelNode/NGINX
NGINX_INTERFACE_NAME = sites-available/tunnel.mydomain.com
NGINX_DOMAIN = sshtun.mydomain.com
NGINX_UPPER_RANGE = 7000
Expand Down
72 changes: 72 additions & 0 deletions Caddy/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

# prince2, 6081, 2022-09-25T07:09:22Z
prince2.sshtun.mydomain.com {
reverse_proxy / 127.0.0.1:6081
log {
output file /var/log/caddy/prince2.sshtun.mydomain.com.access.log {
roll_size 3MiB
roll_keep 5
roll_keep_for 48h
}
format console
}
encode gzip zstd

tls connect@lazarus.network {
protocols tls1.2 tls1.3
}
}

# guarav, 8081, 2022-09-26T15:50:48Z
guarav.webtun.mydomain.com {
reverse_proxy / 127.0.0.1:8081
log {
output file /var/log/caddy/guarav.webtun.mydomain.com.access.log {
roll_size 3MiB
roll_keep 5
roll_keep_for 48h
}
format console
}
encode gzip zstd

tls connect@lazarus.network {
protocols tls1.2 tls1.3
}
}

# guarava, 8887, 2022-09-26T15:55:14Z
guarava.webtun.mydomain.com {
reverse_proxy / 127.0.0.1:8887
log {
output file /var/log/caddy/guarava.webtun.mydomain.com.access.log {
roll_size 3MiB
roll_keep 5
roll_keep_for 48h
}
format console
}
encode gzip zstd

tls connect@lazarus.network {
protocols tls1.2 tls1.3
}
}

# guaravaa, 8847, 2022-09-26T15:57:51Z
guaravaa.webtun.mydomain.com {
reverse_proxy / 127.0.0.1:8847
log {
output file /var/log/caddy/guaravaa.webtun.mydomain.com.access.log {
roll_size 3MiB
roll_keep 5
roll_keep_for 48h
}
format console
}
encode gzip zstd

tls connect@lazarus.network {
protocols tls1.2 tls1.3
}
}
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

.PHONY: proto generate
gen:
protoc --proto_path=proto proto/*.proto --go_out=api/v1/nginx --go-grpc_out=api/v1/nginx

clean:
rm -rf server/pb/
rm -rf client/pb/

.PHONY: run server
server:
go run server/main.go redis

.PHONY: run client
client:
go run client/main.go

install:
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1
sudo apt install protobuf
sudo apt install clang-format
sudo apt install grpcurl
export GO_PATH=~/go
export PATH=$PATH:/$GO_PATH/bin
go mod vendor
path:
export GO_PATH=~/go
export PATH=$PATH:/$GO_PATH/bin

test:
rm -rf tmp && mkdir tmp
go test -cover -race serializer/*.go

run:
go run . ./.env
195 changes: 195 additions & 0 deletions NGINX/sites-available/tunnel.mydomain.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@

# prince2, 6081, 2022-09-25T07:09:22Z
server {
listen 6000;
server_name prince2.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6081$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# prince3, 6887, 2022-09-25T07:13:13Z
server {
listen 6000;
server_name prince3.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6887$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# prince4, 6847, 2022-09-25T07:16:25Z
server {
listen 6000;
server_name prince4.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6847$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# creta, 6059, 2022-09-26T05:19:57Z
server {
listen 6000;
server_name creta.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6059$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# creta2, 6318, 2022-09-26T05:21:00Z
server {
listen 6000;
server_name creta2.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6318$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# creta3, 6425, 2022-09-26T07:31:10Z
server {
listen 6000;
server_name creta3.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6425$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# magic, 6540, 2022-09-26T08:09:55Z
server {
listen 6000;
server_name magic.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6540$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# lolop, 6300, 2022-09-26T09:55:32Z
server {
listen 6000;
server_name lolop.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6300$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# ayuhs, 6694, 2022-09-26T10:59:21Z
server {
listen 6000;
server_name ayuhs.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6694$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# nitish, 6511, 2022-09-26T11:13:42Z
server {
listen 6000;
server_name nitish.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6511$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# abhinav, 6162, 2022-09-26T11:31:52Z
server {
listen 6000;
server_name abhinav.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6162$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# granted, 6089, 2022-09-26T11:39:56Z
server {
listen 6000;
server_name granted.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6089$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}

# pushpa, 6728, 2022-09-26T11:41:49Z
server {
listen 6000;
server_name pushpa.sshtun.mydomain.com;

location / {
proxy_pass http://127.0.0.1:6728$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_redirect off;
}
}
Loading