Skip to content

Commit

Permalink
Add initial project setup for TLS Checker with Prettier integration
Browse files Browse the repository at this point in the history
- Created a new README.md file outlining the features, installation, and usage of the TLS Checker application.
- Added package.json and package-lock.json to manage Prettier as a development dependency for code formatting.
- Updated .gitignore to exclude node_modules and the new tls-checker directory.

This commit establishes the foundational documentation and development environment for the TLS Checker application, enhancing code quality and usability.
  • Loading branch information
hskiba committed Jan 15, 2025
1 parent 91dfe1e commit 4c59aa2
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.pem
*.crt
*.key
node_modules
tls-checker
91 changes: 91 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# TLS Checker

A command-line tool for testing TLS connections with both HTTP and RabbitMQ servers.

## Features

- HTTP server with TLS support
- RabbitMQ server with TLS support (using Docker)
- HTTP client for testing TLS connections
- AMQP client for testing RabbitMQ TLS connections
- Configurable via command line flags or config file

## Installation

### Prerequisites

- Go 1.19 or later
- Docker (for RabbitMQ server functionality)

### Installing from source

```bash
go install https://github.com/frgrisk/tls-checker@latest
```

## Usage

### Running HTTP Server

```bash
tls-checker server --cert cert.pem --key key.pem --addr localhost:8443
```

### Running RabbitMQ Server

```bash
tls-checker server --rabbitmq --cert cert.pem --key key.pem
```

### Testing HTTP Connection

```bash
tls-checker client --ca rootCA.pem --addr localhost:8443
```

### Testing RabbitMQ Connection

```bash
tls-checker client --rabbitmq --ca rootCA.pem --addr localhost:5671
```

## Configuration

Configuration can be provided via command-line flags or a config file (`$HOME/.tlsapp.yaml`).

### Command-line Flags

- `--config`: Path to config file (default: `$HOME/.tlsapp.yaml`)
- `--cert`: Path to certificate file (default: `cert.pem`)
- `--key`: Path to private key file (default: `key.pem`)
- `--ca`: Path to root CA certificate (default: `rootCA.pem`)
- `--addr`: Address to serve on or connect to (default: `localhost:8443`)

### Server-specific Flags

- `--rabbitmq`: Run RabbitMQ server instead of HTTP server

### Config File Format

```yaml
cert: "cert.pem"
key: "key.pem"
ca: "rootCA.pem"
addr: "localhost:8443"
```
## RabbitMQ Server Details
When running the RabbitMQ server:
- AMQPS port: 5671
- Management UI:
- HTTP: http://localhost:15672
- HTTPS: https://localhost:15671
- Default credentials: guest/guest
## Security Notes
- The tool uses TLS 1.2+ for secure communications
- Certificate verification is enabled by default
- RabbitMQ server is run in a Docker container with proper TLS configuration
28 changes: 28 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"devDependencies": {
"prettier": "3.4.2"
}
}

0 comments on commit 4c59aa2

Please sign in to comment.