add probe folder
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
# 🛰️ Obsero Probe
|
||||
|
||||
Lightweight monitoring agent for generating Proof-of-Observability JSON files.
|
||||
|
||||
This probe performs HTTP health checks, automatically geolocates itself, and exports signed observation files compliant with the Obsero specification.
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Requirements
|
||||
|
||||
- Go 1.21+
|
||||
- Internet access (for geo lookup and ping)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
### 1. Clone & Enter
|
||||
|
||||
```bash
|
||||
cd probe
|
||||
```
|
||||
|
||||
### 2. Install dependencies
|
||||
|
||||
```bash
|
||||
go mod tidy
|
||||
```
|
||||
|
||||
### 3. Run the probe
|
||||
|
||||
```bash
|
||||
go run ./cmd/obsero-probe
|
||||
```
|
||||
|
||||
This will:
|
||||
- Ping `https://example.com`
|
||||
- Auto-detect country, city and region
|
||||
- Output a file named `proof_http_result.json`
|
||||
|
||||
---
|
||||
|
||||
## 📄 Output Format
|
||||
|
||||
The output file is a valid Obsero proof:
|
||||
|
||||
```json
|
||||
{
|
||||
"timestamp": "2025-04-29T14:00:00Z",
|
||||
"target": "https://example.com",
|
||||
"status": "up",
|
||||
"http_status_code": 200,
|
||||
"latency_ms": 145,
|
||||
"error_message": null,
|
||||
"observer": {
|
||||
"address": "0xABCD...1234",
|
||||
"country": "France",
|
||||
"region": "Île-de-France",
|
||||
"city": "Paris",
|
||||
"probe_version": "0.1"
|
||||
},
|
||||
"version": "0.1"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📦 Next steps
|
||||
|
||||
- Add CLI support (`--target`, `--output`)
|
||||
- Add cryptographic signature of the proof
|
||||
- Upload to IPFS
|
||||
- Submit hash + CID on Base chain
|
||||
|
||||
---
|
||||
|
||||
## 📁 Structure
|
||||
|
||||
```
|
||||
probe/
|
||||
├── cmd/
|
||||
│ └── obsero-probe/
|
||||
│ └── main.go # CLI entrypoint
|
||||
├── pkg/
|
||||
│ ├── geo/ # IP geolocation
|
||||
│ ├── probe/ # HTTP ping logic
|
||||
│ └── proof/ # Proof struct + output
|
||||
├── go.mod
|
||||
├── go.sum
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📜 License
|
||||
|
||||
MIT — Cryptolab.re
|
||||
Reference in New Issue
Block a user