https://github.com/wux1an/fake-cert
generates random TLS certificates 🎊
https://github.com/wux1an/fake-cert
certificate fake fake-cert fake-certificate https https-server server
Last synced: over 1 year ago
JSON representation
generates random TLS certificates 🎊
- Host: GitHub
- URL: https://github.com/wux1an/fake-cert
- Owner: wux1an
- Created: 2023-05-15T14:15:50.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-15T14:49:23.000Z (about 3 years ago)
- Last Synced: 2025-01-21T04:41:34.619Z (over 1 year ago)
- Topics: certificate, fake, fake-cert, fake-certificate, https, https-server, server
- Language: Go
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ⚒️ fake-cert
This repository is a Go library that generates random TLS certificates 🎊
## 🏅 Feature
Generate a random tls certificate with:
- [x] random serial number
- [x] random subject information
- [x] random validity, the year, the month and the day are random
- [ ] random encryption suite (defence [ja3](https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967/))
- [ ] copy certificate information from certain website (defence [ja3](https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967/))
**Preview:**
## 🎨 Usage
Create a simple https server:
```ruby
go get -u github.com/wux1an/fake-useragent
```
```go
package main
import (
"crypto/tls"
"github.com/wux1an/fake-cert"
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", func(writer http.ResponseWriter, request *http.Request) {
writer.Write([]byte("Your IP Address: " + request.RemoteAddr))
})
// 1. create tls certificate
certs := cert.Random(2048)
listener, _ := tls.Listen("tcp", "127.0.0.1:2023", &tls.Config{Certificates: []tls.Certificate{certs}})
// 2. start a http server
fmt.Println("http served at https://127.0.0.1:2023")
_ = http.Serve(listener, nil)
}
```
## 🔗 References
- https://github.com/kost/revsocks