Skip to content

Commit d75bfbd

Browse files
authored
Merge pull request #13 from Its-Satyajit/is-branch-4
docs: add macOS/Windows instructions and community files
2 parents 9b58fb3 + c23d4e3 commit d75bfbd

4 files changed

Lines changed: 139 additions & 3 deletions

File tree

CODE_OF_CONDUCT.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and maintainers pledge to make participation in our community a harassment-free experience for everyone.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to a positive environment:
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior:
18+
19+
- Trolling, insulting/derogatory comments, and personal or political attacks
20+
- Public or private harassment
21+
- Publishing others' private information without permission
22+
- Other conduct which could reasonably be considered inappropriate
23+
24+
## Our Responsibilities
25+
26+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
27+
28+
## Scope
29+
30+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
31+
32+
## Enforcement
33+
34+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainers. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
35+
36+
## Attribution
37+
38+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.

CONTRIBUTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributing to DevBind
2+
3+
Thank you for your interest in contributing to DevBind!
4+
5+
## Development Setup
6+
7+
```bash
8+
git clone https://github.com/Its-Satyajit/dev-bind.git
9+
cd dev-bind
10+
cargo build
11+
```
12+
13+
## Code Style
14+
15+
- Run `cargo fmt` before committing
16+
- Run `cargo clippy -- -D warnings` to check for issues
17+
- Follow existing code conventions in the codebase
18+
19+
## Pull Request Process
20+
21+
1. Fork the repository
22+
2. Create a feature branch (`git checkout -b feature/your-feature`)
23+
3. Make your changes and ensure tests pass
24+
4. Push to your fork and submit a pull request
25+
5. Ensure PR description explains the changes and motivation
26+
27+
## Testing
28+
29+
Run tests with:
30+
```bash
31+
cargo test
32+
```
33+
34+
## Building
35+
36+
```bash
37+
# Full build (CLI + GUI)
38+
cargo build --release
39+
40+
# CLI only
41+
cargo build --release --no-default-features --features cli
42+
```
43+
44+
## Questions
45+
46+
For questions, open a GitHub discussion or issue.

README.md

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ Modern web development requires HTTPS, but setting it up locally is a nightmare.
3636
DevBind is built deeply into the Linux networking stack for a seamless, zero-config experience.
3737

3838
- **Supported OS**: Linux (Tested on CachyOS, Arch, Manjaro, Ubuntu, Debian, Pop!_OS)
39-
- **Init System**: `systemd` (Required for background daemon management)
40-
- **Network Manager**: `NetworkManager` (Required for zero-config DNS resolution using `dnsmasq` integration)
41-
- **Privilege Escalation**: A working `polkit` agent (Required for GUI root operations like `pkexec`)
39+
- Experimental support for macOS and Windows (Manual setup required).
40+
- **Init System**: `systemd` (Required for background daemon management on Linux)
41+
- **Network Manager**: `NetworkManager` (Required for zero-config DNS resolution on Linux)
42+
- **Privilege Escalation**: A working `polkit` agent (Required for GUI root operations on Linux)
4243

4344
### Dependencies
4445

@@ -73,6 +74,54 @@ If you are running on a server without graphical dependencies (like GTK or WebKi
7374
4. Grant `CAP_NET_BIND_SERVICE` so DevBind can bind ports `80`/`443` without root
7475
5. Hook into your `.desktop` application menu (unless `--cli-only` is passed)
7576

77+
### Other Platforms (macOS & Windows)
78+
79+
> [!IMPORTANT]
80+
> DevBind is primarily built for Linux. Support for macOS and Windows is **experimental** and requires manual configuration for DNS and SSL trust.
81+
82+
#### Installation
83+
You must have the [Rust toolchain](https://rustup.rs/) installed.
84+
```bash
85+
git clone https://github.com/Its-Satyajit/dev-bind.git
86+
cd dev-bind
87+
cargo build --release
88+
```
89+
The binaries will be located in `target/release/devbind` and `target/release/devbind-gui`.
90+
91+
#### Manual DNS Setup
92+
93+
**macOS:**
94+
Create a file at `/etc/resolver/test` with the following content (requires `sudo`):
95+
```text
96+
nameserver 127.0.2.1
97+
```
98+
This tells macOS to route all `*.test` queries to DevBind's embedded DNS server.
99+
100+
**Windows:**
101+
Windows does not support a native "resolver" directory like macOS. You must manually add entries to `C:\Windows\System32\drivers\etc\hosts`:
102+
```text
103+
127.0.0.1 myapp.test
104+
127.0.0.1 anotherapp.test
105+
```
106+
107+
#### Manual SSL Trust
108+
109+
1. Start DevBind once to generate the Root CA: `devbind start`.
110+
2. Locate the Root CA file:
111+
- macOS: `~/Library/Application Support/devbind/certs/devbind-rootCA.crt`
112+
- Windows: `%APPDATA%\devbind\certs\devbind-rootCA.crt`
113+
3. **macOS**: Import to Keychain Access and set to "Always Trust".
114+
```bash
115+
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/Library/Application\ Support/devbind/certs/devbind-rootCA.crt
116+
```
117+
4. **Windows**: Import to "Trusted Root Certification Authorities" using `certutil`:
118+
```powershell
119+
certutil -addstore -f "Root" %APPDATA%\devbind\certs\devbind-rootCA.crt
120+
```
121+
122+
> [!NOTE]
123+
> These paths and commands are based on the `dirs` crate's platform-specific behavior. Since the I don't have access to macOS or Windows devices for testing, please [open an issue](https://github.com/Its-Satyajit/dev-bind/issues) if you encounter any problems.
124+
76125
### Reinstalling / Updating
77126

78127
If DevBind is currently running, stop it first — Linux won't overwrite a busy executable:

TROUBLESHOOTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ Ensure `systemd --user` is running in your session:
4545
```bash
4646
systemctl --user status
4747
```
48+
49+
### macOS & Windows Support
50+
Since support for these platforms is experimental, many automated commands (`devbind install`, `devbind trust`) will not work. Ensure you have followed the manual setup steps in the [README](README.md#other-platforms-macos--windows).

0 commit comments

Comments
 (0)