Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

0xacab.org/leap/bitmask-core

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

0xacab.org/leap/bitmask-core

  • v0.0.0-20241116015337-f6bc75b058ac
  • Go
  • Socket score

Version published
Created
Source

bitmask-core

bitmask-core is a library to handle bootstrap for a LEAP provider in an unified way.

Bitmask-core will be code shared by desktop and mobile apps that will unify the discovery process. The major architectural change in bitmask-core is that it generates API clients automatically from the OpenAPI spec generated by latest menshen. bitmask-core implements a local key-value store to persist configuration (private bridges, etc). An interface to replace native stores will be needed.

The docs about introducer/invite code can be found here.

Features

  • a go library that exports functions to get gateways, bridges, VPN credentials and more from menshen (the backend)
  • For the initial boostrap, DoH (DNS over HTTPs) or an arbitrary SOCKS5 proxy (for Tor/snowflake)
  • Handle a local registry of known introducers. An introducer is an obfuscation proxy used to communicate with menshen, the service configuration API.
  • Handle a local registry of private bridges.

Persistent config

You can use $HOME/.bitmaskcfg for some common settings that will be picked by default:

❯ cat ~/.bitmaskcfg
host: menshen.example.org
#bridge: bridge-1
#introducer: littleintroducer

Android library

You can create the Android library of bitmask-core by running:

make mobileclient

If you don't want to bother installing Android NDK, you can also build the library in a Docker image containing the Android development environment from our container registry:

sudo docker run --rm -w /bitmask-core -it -v $(pwd):/bitmask-core -t registry.0xacab.org/leap/bitmask_android/android-ndk:latest make mobileclient

If everything works you will get bitmask-core.aar and bitmask-core-sources.jar in the project root.

Maintenance

For synchronized changes in the api, simply update the version of menshen that we import.

This can be done with go get:

$ go get 0xacab.org/leap/menshen@HASH_OR_VERSION

Tests

Use make test to run the unit tests.

Use make integration_test to run the integration tests. For the integration tests, a local menshen container gets started (see tests/docker-compose-local.yml).

In order to add new intergration tests, just add a new golang unit test that contains Integration in its function name, for example

func TestIntegrationGetService(t *testing.T) {
  ...
}

The CI runs the unit and integration tests.

FAQs

Package last updated on 16 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc