Skip to content

Commit

Permalink
Simplify this version, use another branch for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
RoLex committed May 23, 2020
1 parent d924e03 commit 64d3aaf
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 246 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ TLS proxy server for NMDC protocol. Currently supported by Verlihub 1.2.0.5 and

## Generate self signed certificate

`openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out "CertName.crt" -keyout "KeyName.key"`
`openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out "hub.crt" -keyout "hub.key"`

## Install GoLang
## Install Go

In order to install latest version:

`sudo snap install --classic go`
`sudo apt-get install golang`

Else use:
On old distributions you might need to use `snap` to install later version:

`sudo apt-get install golang`
`sudo snap install --classic go`

## Compile proxy server

Expand All @@ -24,15 +22,9 @@ cd tls-proxy
go build proxy.go
```

With metrics:

```
go build --tags metrics proxy.go
```

## Start proxy server

`./proxy --cert="/path/to/CertName.crt" --key="/path/to/KeyName.key" --host="1.2.3.4:411" --hub="127.0.0.1:411"`
`./proxy --cert="/path/to/hub.crt" --key="/path/to/hub.key" --host="1.2.3.4:411" --hub="127.0.0.1:411"`

`1.2.3.4:411` is the proxy listening socket, the address that hub would normally be listening on. `127.0.0.1:411` is the hub listening socket, the address that accepts connections from the proxy. Add `&` at the end of command to run the process in background.

Expand Down
11 changes: 0 additions & 11 deletions go.mod

This file was deleted.

46 changes: 0 additions & 46 deletions go.sum

This file was deleted.

41 changes: 0 additions & 41 deletions metrics/common.go

This file was deleted.

7 changes: 0 additions & 7 deletions metrics/noop.go

This file was deleted.

58 changes: 0 additions & 58 deletions metrics/prometheus.go

This file was deleted.

Loading

0 comments on commit 64d3aaf

Please sign in to comment.