Skip to content

Griger10/happ-cmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

happcmd

CI codecov License Go Version

CLI tool for generating routing profile import links for the Happ application.

Installation

Download binary

Download the latest release from the Releases page.

Build from source

git clone https://github.com/Griger10/happcmd
cd happcmd
go build -o happcmd .

Usage

Interactive mode

Run without arguments to open the interactive menu:

happcmd

CLI mode

# Default Russia routing profile
happcmd generate

# With a custom profile name
happcmd generate -n "My Profile"

# Auto-activate on import
happcmd generate -m onadd

# Add sites to direct routing
happcmd generate --add-direct-site "domain:github.com" --add-direct-site "domain:notion.so"

# Add sites to block list
happcmd generate --add-block-site "geosite:gambling"

# Add IPs to direct routing
happcmd generate --add-direct-ip "1.2.3.4/32"

# Combined example
happcmd generate -n "Work" -m onadd \
  --add-direct-site "domain:github.com" \
  --add-block-site "geosite:gambling"

Flags

Flag Short Default Description
--name -n DefaultProfile Profile name in Happ
--mode -m add Import mode: add or onadd
--add-direct-site Add domain to direct routing
--add-block-site Add domain to block list
--add-direct-ip Add IP/CIDR to direct routing

Import modes

Mode Description
add Adds the profile to the list. The first added profile becomes active after geo files are loaded
onadd Adds and immediately activates the profile

Default profile

Direct routing (no tunnel):

  • Russian domains and IPs (geosite:ru, geoip:ru)
  • VK, Yandex, Mail.ru and related CDNs
  • Government sites (geosite:category-gov-ru)
  • Local networks

Blocked:

  • Ad networks (geosite:category-ads-all)

DNS:

  • Remote: Google DoH (https://dns.google/dns-query)
  • Domestic: Yandex DoU

Requirements

  • Go 1.21+
  • Happ app on iOS

License

MIT

About

CLI tool for generating Happ routing profile import links. Supports custom direct, proxy, and block rules with a built-in Russia routing preset.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages