Skip to content
/ urusai Public

Go implementation of noisy HTTP/DNS traffic generator

License

Notifications You must be signed in to change notification settings

calpa/urusai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”Š Urusai

うるさい - Your Privacy Shield in the Digital Noise

Go Report Card License: MIT GitHub stars GitHub last commit

A Go implementation of noisy - Making your web traffic less valuable, one request at a time πŸ›‘οΈ

🌟 What is Urusai?

Urusai (Japanese for 'noisy') is your digital privacy companion that generates random HTTP/DNS traffic noise in the background while you browse the web. By creating this digital smokescreen, it helps make your actual web traffic data less valuable for tracking and selling.

✨ Features

  • 🌐 Generates random HTTP/DNS traffic by crawling websites
  • βš™οΈ Configurable via JSON configuration file
  • 🎭 Customizable user agents, root URLs, and blacklisted URLs
  • ⏱️ Adjustable crawling depth and sleep intervals
  • ⏰ Optional timeout setting

πŸ“₯ Installation

πŸ“¦ Using Pre-built Binaries

The easiest way to get started is to download a pre-built binary from the releases page πŸš€

  1. Download the appropriate binary for your platform:

    • 🍎 urusai-macos-amd64 - for macOS Intel systems
    • 🍏 urusai-macos-arm64 - for macOS Apple Silicon systems
    • 🐧 urusai-linux-amd64 - for Linux x86_64 systems
    • πŸͺŸ urusai-windows-amd64.exe - for Windows x86_64 systems
  2. Make the binary executable (Unix-based systems only):

    chmod +x urusai-*
  3. πŸš€ Run the binary:

    # 🍎 On macOS (Intel)
    ./urusai-macos-amd64
    
    # 🍏 On macOS (Apple Silicon)
    ./urusai-macos-arm64
    
    # 🐧 On Linux
    ./urusai-linux-amd64
    
    # πŸͺŸ On Windows (using Command Prompt)
    urusai-windows-amd64.exe

πŸ› οΈ Building from Source

# πŸ’» Clone the repository
git clone https://github.com/calpa/urusai.git

# πŸ“ Navigate to the project directory
cd urusai

# πŸ’Ώ Build the project
go build -o urusai

🐳 Using Docker

🌌 Pull from Docker Hub

# πŸ“₯ Pull the latest image
docker pull calpa/urusai:latest

# πŸš€ Run the container with default configuration
docker run calpa/urusai

# βš™οΈ Run with custom configuration (mount your config file)
docker run -v $(pwd)/config.json:/app/config.json calpa/urusai

The Docker image is available for multiple platforms:

  • πŸ’» linux/amd64 (x86_64)
  • 🍏 linux/arm64 (Apple Silicon)
  • πŸ“± linux/arm/v7 (32-bit ARM)

πŸ’» Build Locally

# πŸ—οΈ Build the Docker image
docker build -t urusai .

# πŸš€ Run your locally built container
docker run urusai

Usage

# Run with built-in default configuration
./urusai

# Run with custom configuration file
./urusai --config config.json

# Show help
./urusai --help

Command Line Arguments

  • --config: Path to the configuration file (optional, uses built-in default configuration if not specified)
  • --log: Logging level (default: "info")
  • --timeout: For how long the crawler should be running, in seconds (optional, 0 means no timeout)

βš™οΈ Configuration

Urusai comes with a built-in default configuration, but you can also provide your own custom configuration file. The configuration is in JSON format with the following structure:

{
    "max_depth": 25,      // πŸ•³οΈ Maximum crawling depth
    "min_sleep": 3,      // πŸ’€ Minimum sleep between requests (seconds)
    "max_sleep": 6,      // ⏳ Maximum sleep between requests (seconds)
    "timeout": 0,        // ⏰ Crawler timeout (0 = no timeout)
    "root_urls": [       // 🌐 Starting points for crawling
        "https://www.wikipedia.org",
        "https://www.github.com"
    ],
    "blacklisted_urls": [ // β›” URLs to skip
        ".css",
        ".ico",
        ".xml"
    ],
    "user_agents": [      // πŸ‘¨β€πŸ’» Browser identities
        "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
    ]
}

πŸ‘¨β€πŸ’» For Developers

πŸ› οΈ Development

Urusai is developed using standard Go practices. Here are some commands that will help you during development:

# πŸ’» Run the project directly without building
go run main.go

# πŸ“ Run with a specific log level
go run main.go --log debug

# βš™οΈ Run with a custom configuration file
go run main.go --config config.json

# ⏰ Run with a timeout (in seconds)
go run main.go --timeout 300

πŸ§ͺ Testing

Urusai includes comprehensive test coverage for all packages. The tests verify configuration loading, command-line flag parsing, and crawler functionality.

# 🎣 Run all tests
go test ./...

# πŸ“˜ Run tests with verbose output
go test -v ./...

# πŸ“ˆ Run tests with coverage
go test -cover ./...

# πŸ“‹ Generate a coverage report
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out

Test files include:

  • πŸ““ main_test.go: Tests for command-line parsing, configuration loading, and signal handling
  • πŸ“’ config/config_test.go: Tests for configuration loading and validation

πŸ—οΈ Building

# πŸ› οΈ Build for the current platform
go build -o urusai

# πŸ’» Build for a specific platform (e.g., Linux)
GOOS=linux GOARCH=amd64 go build -o urusai-linux-amd64

# 🌐 Build for multiple platforms
GOOS=darwin GOARCH=amd64 go build -o urusai-macos-amd64
GOOS=windows GOARCH=amd64 go build -o urusai-windows-amd64.exe

⭐ Star History

Star History Chart

πŸš€ Releases

Urusai uses GitHub Actions for automated releases. When a new tag with format v* (e.g., v1.0.0) is pushed to the repository, GitHub Actions will automatically:

  1. πŸ§ͺ Run tests to ensure code quality
  2. πŸ”¨ Build binaries for all supported platforms (macOS Intel/ARM, Linux, Windows)
  3. πŸ“¦ Create compressed archives of the binaries
  4. πŸŽ‰ Create a new GitHub release with the binaries attached

To create a new release:

# 🏷️ Tag the commit
git tag v1.0.0

# πŸš€ Push the tag to GitHub
git push origin v1.0.0

The GitHub Actions workflow will handle the rest automatically.

πŸ’Ž Code Quality

# 🎨 Format code
go fmt ./...

# πŸ” Vet code for potential issues
go vet ./...

# ✨ Run linter (requires golint)
go install golang.org/x/lint/golint@latest
golint ./...

# πŸ”¬ Run static analysis (requires staticcheck)
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./...

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details. βš–οΈ

About

Go implementation of noisy HTTP/DNS traffic generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published