mirror of
https://github.com/DefinedNet/mobile_nebula.git
synced 2025-09-05 10:46:04 +00:00
Compare commits
9 commits
70b553fa0c
...
c59b006078
Author | SHA1 | Date | |
---|---|---|---|
|
c59b006078 | ||
|
de2b3dccb7 | ||
|
ad9b331f32 | ||
|
379b997c05 | ||
|
545b679fce | ||
|
18952a229f | ||
|
4270e9fdac | ||
|
531b234ec4 | ||
|
90a6c7f01a |
4 changed files with 70 additions and 56 deletions
41
DEVELOPING.md
Normal file
41
DEVELOPING.md
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
**This project is not accepting PRs. These instructions are for employees of Defined Networking.**
|
||||||
|
|
||||||
|
## Setting up dev environment
|
||||||
|
|
||||||
|
Install all the following things:
|
||||||
|
|
||||||
|
- [`xcode`](https://apps.apple.com/us/app/xcode/) - use the version specified by `xcode_select` in `/ios/fastlane/Fastfile`
|
||||||
|
- [`android-studio`](https://developer.android.com/studio)
|
||||||
|
- [`flutter` 3.29.2](https://docs.flutter.dev/get-started/install)
|
||||||
|
- [`gomobile`](https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile)
|
||||||
|
- [Flutter Android Studio Extension](https://docs.flutter.dev/get-started/editor?tab=androidstudio)
|
||||||
|
|
||||||
|
Ensure your path is set up correctly to execute flutter
|
||||||
|
|
||||||
|
Run `flutter doctor` and fix everything it complains before proceeding
|
||||||
|
|
||||||
|
*NOTE* on iOS, always open `Runner.xcworkspace` and NOT the `Runner.xccodeproj`
|
||||||
|
|
||||||
|
### Before first compile
|
||||||
|
|
||||||
|
- Copy `env.sh.example` and set it up for your machine
|
||||||
|
- Ensure you have run `gomobile init`
|
||||||
|
- In Android Studio, make sure you have the current NDK installed by going to Tools → SDK Manager, go to the SDK Tools tab, check the `Show package details` box, expand the NDK section and select `27.0.12077973` version.
|
||||||
|
- Ensure you have downloaded an NDK via android studio, this is likely not the default one, and you need to check the
|
||||||
|
`Show package details` box to select the correct version. The correct version comes from the error when you try and compile
|
||||||
|
- Make sure you have `gem` installed with `sudo gem install`
|
||||||
|
- If on macOS arm64, `sudo gem install ffi -- --enable-libffi-alloc`
|
||||||
|
|
||||||
|
If you are having issues with iOS pods, try blowing it all away! `cd ios && rm -rf Pods/ Podfile.lock && pod install --repo-update`
|
||||||
|
|
||||||
|
## Formatting
|
||||||
|
|
||||||
|
`dart format` can be used to format the code in `lib` and `test`. We use a line-length of 120 characters.
|
||||||
|
|
||||||
|
Use:
|
||||||
|
```sh
|
||||||
|
dart format lib/ test/ -l 120
|
||||||
|
```
|
||||||
|
|
||||||
|
In Android Studio, set the line length using Preferences → Editor → Code Style → Dart → Line length, set it to 120. Enable auto-format with Preferences → Languages & Frameworks → Flutter → Format code on save.
|
||||||
|
|
59
README.md
59
README.md
|
@ -2,61 +2,8 @@
|
||||||
|
|
||||||
[Play Store](https://play.google.com/store/apps/details?id=net.defined.mobile_nebula&hl=en_US&gl=US) | [App Store](https://apps.apple.com/us/app/mobile-nebula/id1509587936)
|
[Play Store](https://play.google.com/store/apps/details?id=net.defined.mobile_nebula&hl=en_US&gl=US) | [App Store](https://apps.apple.com/us/app/mobile-nebula/id1509587936)
|
||||||
|
|
||||||
## Setting up dev environment
|
Nebula is an overlay networking tool designed to be fast, secure, and scalable. Connect any number of hosts with on-demand, encrypted tunnels that work across any IP networks and without opening firewall ports.
|
||||||
|
|
||||||
Install all of the following things:
|
Mobile Nebula brings this functionality to devices running Android and iOS.
|
||||||
|
|
||||||
- [`xcode`](https://apps.apple.com/us/app/xcode/) - use the version specified by `xcode_select` in `/ios/fastlane/Fastfile`
|
This code is **source-available** meaning that the source is provided for viewing, but we are **not accepting contributions** and provide no license past what the [GitHub Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service#5-license-grant-to-other-users) permit.
|
||||||
- [`android-studio`](https://developer.android.com/studio)
|
|
||||||
- [`flutter` 3.29.2](https://docs.flutter.dev/get-started/install)
|
|
||||||
- [`gomobile`](https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile)
|
|
||||||
- [Flutter Android Studio Extension](https://docs.flutter.dev/get-started/editor?tab=androidstudio)
|
|
||||||
|
|
||||||
Ensure your path is set up correctly to execute flutter
|
|
||||||
|
|
||||||
Run `flutter doctor` and fix everything it complains before proceeding
|
|
||||||
|
|
||||||
*NOTE* on iOS, always open `Runner.xcworkspace` and NOT the `Runner.xccodeproj`
|
|
||||||
|
|
||||||
### Before first compile
|
|
||||||
|
|
||||||
- Copy `env.sh.example` and set it up for your machine
|
|
||||||
- Ensure you have run `gomobile init`
|
|
||||||
- In Android Studio, make sure you have the current ndk installed by going to Tools -> SDK Manager, go to the SDK Tools tab, check the `Show package details` box, expand the NDK section and select `27.0.12077973` version.
|
|
||||||
- Ensure you have downloaded an ndk via android studio, this is likely not the default one and you need to check the
|
|
||||||
`Show package details` box to select the correct version. The correct version comes from the error when you try and compile
|
|
||||||
- Make sure you have `gem` installed with `sudo gem install`
|
|
||||||
- If on MacOS arm, `sudo gem install ffi -- --enable-libffi-alloc`
|
|
||||||
|
|
||||||
If you are having issues with iOS pods, try blowing it all away! `cd ios && rm -rf Pods/ Podfile.lock && pod install --repo-update`
|
|
||||||
|
|
||||||
# Formatting
|
|
||||||
|
|
||||||
`dart format` can be used to format the code in `lib` and `test`. We use a line-length of 120 characters.
|
|
||||||
|
|
||||||
Use:
|
|
||||||
```sh
|
|
||||||
dart format lib/ test/ -l 120
|
|
||||||
```
|
|
||||||
|
|
||||||
In Android Studio, set the line length using Preferences -> Editor -> Code Style -> Dart -> Line length, set it to 120. Enable auto-format with Preferences -> Languages & Frameworks -> Flutter -> Format code on save.
|
|
||||||
|
|
||||||
`./swift-format.sh` can be used to format Swift code in the repo.
|
|
||||||
|
|
||||||
Once `swift-format` supports ignoring directories (<https://github.com/swiftlang/swift-format/issues/870>), we can move to a method of running it more like what <https://calebhearth.com/swift-format-github-action> describes.
|
|
||||||
|
|
||||||
# Release
|
|
||||||
|
|
||||||
Update `version` in `pubspec.yaml` to reflect this release, then
|
|
||||||
|
|
||||||
## Android
|
|
||||||
|
|
||||||
`flutter build appbundle`
|
|
||||||
|
|
||||||
This will create an android app bundle at `build/app/outputs/bundle/release/`
|
|
||||||
|
|
||||||
Upload the android bundle to the google play store https://play.google.com/apps/publish
|
|
||||||
|
|
||||||
## iOS
|
|
||||||
|
|
||||||
In xcode, Release -> Archive then follow the directions to upload to the app store. If you have issues, https://flutter.dev/docs/deployment/ios#create-a-build-archive
|
|
||||||
|
|
16
RELEASING.md
Normal file
16
RELEASING.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Releasing
|
||||||
|
|
||||||
|
## Prerelease
|
||||||
|
|
||||||
|
Push a git tag `v#.#.#-##`, e.g. `v0.5.1-0`, and `.github/release.yml` will build a draft release and publish it to iOS TestFlight and Android internal track.
|
||||||
|
|
||||||
|
`./swift-format.sh` can be used to format Swift code in the repo.
|
||||||
|
|
||||||
|
Once `swift-format` supports ignoring directories (<https://github.com/swiftlang/swift-format/issues/870>), we can move to a method of running it more like what <https://calebhearth.com/swift-format-github-action> describes.
|
||||||
|
|
||||||
|
## Release
|
||||||
|
|
||||||
|
1. Manually promote a prerelease build from TestFlight and Android internal track to the corresponding public app stores.
|
||||||
|
2. Mark the associated draft release as published, removing the `-##` from it, ending with a release in the format `v#.#.#`, e.g. `v0.5.1`.
|
||||||
|
3. Remove the old draft releases that will never be published.
|
||||||
|
4. Add the notable changes to the app to the release summary, e.g.: <https://github.com/DefinedNet/mobile_nebula/releases/tag/v0.5.1>.
|
|
@ -13,6 +13,7 @@ type config struct {
|
||||||
Logging configLogging `yaml:"logging"`
|
Logging configLogging `yaml:"logging"`
|
||||||
Stats configStats `yaml:"stats"`
|
Stats configStats `yaml:"stats"`
|
||||||
Handshakes configHandshakes `yaml:"handshakes"`
|
Handshakes configHandshakes `yaml:"handshakes"`
|
||||||
|
Tunnels configTunnels `yaml:"tunnels"`
|
||||||
Firewall configFirewall `yaml:"firewall"`
|
Firewall configFirewall `yaml:"firewall"`
|
||||||
Relay configRelay `yaml:"relay"`
|
Relay configRelay `yaml:"relay"`
|
||||||
}
|
}
|
||||||
|
@ -64,6 +65,10 @@ func newConfig() *config {
|
||||||
Retries: 20,
|
Retries: 20,
|
||||||
WaitRotation: 5,
|
WaitRotation: 5,
|
||||||
},
|
},
|
||||||
|
Tunnels: configTunnels{
|
||||||
|
DropInactive: true,
|
||||||
|
InactivityTimeout: "10m",
|
||||||
|
},
|
||||||
Firewall: configFirewall{
|
Firewall: configFirewall{
|
||||||
Conntrack: configConntrack{
|
Conntrack: configConntrack{
|
||||||
TcpTimeout: "120h",
|
TcpTimeout: "120h",
|
||||||
|
@ -180,6 +185,11 @@ type configHandshakes struct {
|
||||||
WaitRotation int `yaml:"wait_rotation"`
|
WaitRotation int `yaml:"wait_rotation"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type configTunnels struct {
|
||||||
|
DropInactive bool `yaml:"drop_inactive"`
|
||||||
|
InactivityTimeout string `yaml:"inactivity_timeout"`
|
||||||
|
}
|
||||||
|
|
||||||
type configFirewall struct {
|
type configFirewall struct {
|
||||||
Conntrack configConntrack `yaml:"conntrack"`
|
Conntrack configConntrack `yaml:"conntrack"`
|
||||||
Outbound []configFirewallRule `yaml:"outbound"`
|
Outbound []configFirewallRule `yaml:"outbound"`
|
||||||
|
|
Loading…
Add table
Reference in a new issue