ssl-checker
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v23View latest version
A web application and API for checking SSL certificate information using Deno's built-in TLS connection capabilities.
- Web interface for checking SSL certificates
- REST API endpoints for programmatic access
- Clean, responsive UI built with Hono JSX
- Modular architecture with separated concerns
├── index.ts # Main Hono application with routes
├── ssl-checker.ts # SSL checking logic and types
├── templates.tsx # Hono JSX templates and components
└── README.md # This file
GET /- Main web interface
GET /check?url=<url>- Check SSL certificate (JSON response)POST /check- Check SSL certificate- Form data:
url=<url> - JSON:
{"url": "<url>"}
- Form data:
Visit the root URL to use the interactive form.
GET Request:
curl "https://your-val.web.val.run/check?url=https://google.com"
POST Request (JSON):
curl -X POST "https://your-val.web.val.run/check" \ -H "Content-Type: application/json" \ -d '{"url": "https://google.com"}'
POST Request (Form):
curl -X POST "https://your-val.web.val.run/check" \ -d "url=https://google.com"
{ "url": "https://google.com/", "hostname": "google.com", "port": 443, "alpnProtocol": null }
Contains the core SSL checking functionality:
checkSSL(url: string)- Main function to check SSL certificatesSSLInfointerface - TypeScript type definitions
Hono JSX components for the web interface:
Layout- Base HTML layout componentHomePage- Main page with formResultsPage- SSL check results display
Main Hono application with:
- Route handlers for web and API endpoints
- Error handling
- Content-type detection for JSON vs form responses
The application includes comprehensive error handling:
- Invalid URLs are caught and reported
- Network errors are handled gracefully
- Different error responses for web vs API requests
