Skip to main content

Contributing to DNS-MNS

Thank you for your interest in contributing to DNS-MNS! This project helps Iranian gamers find and configure optimal DNS servers.

Ways to Contribute

Report Bugs

Found a bug? Open an issue with details about what went wrong.

Suggest Features

Have an idea? Open an issue with your feature request.

Improve Documentation

Fix typos, clarify instructions, or add missing information.

Add DNS Servers

Know a working DNS server? Help expand the list.

Code Contributions

Fix bugs or implement new features via pull requests.

Test & Review

Test the tool on your system and review pull requests.

Getting Started

1. Fork the Repository

Go to gitlab.com/E-Gurl/dns-mns and click Fork.

2. Clone Your Fork

git clone https://gitlab.com/YOUR-USERNAME/dns-mns.git
cd dns-mns

3. Create a Branch

git checkout -b feature/your-feature-name
Use descriptive branch names:
  • feature/add-new-dns-servers
  • fix/macos-dns-setting
  • docs/improve-installation

4. Make Your Changes

Edit the files as needed. See the Code Style guide.

5. Test Your Changes

Before submitting:

6. Commit Your Changes

git add .
git commit -m "feat: add new DNS servers for gaming"
See Commit Message Guidelines below.

7. Push to Your Fork

git push origin feature/your-feature-name

8. Open a Merge Request

Go to your fork on GitLab and click New Merge Request.

Commit Message Guidelines

Use clear, descriptive commit messages with these prefixes:
PrefixUsage
feat:New feature
fix:Bug fix
docs:Documentation changes
refactor:Code restructuring
test:Adding or updating tests
chore:Maintenance tasks
Examples:
feat: add new DNS testing algorithm
fix: resolve macOS DNS setting issue
docs: update README with new instructions
refactor: improve ping test performance

Pull Request Guidelines

When opening a pull request:
  1. Use a descriptive title - Summarize the change
  2. Describe what changed - Explain the what and why
  3. Reference issues - Link related issues with Fixes #123
  4. Include testing steps - How can reviewers test the change?
Example PR description:
## Summary
Added support for OpenSUSE Tumbleweed

## Changes
- Added detection for OpenSUSE in detect_os()
- Added DNS setting method using NetworkManager

## Testing
Tested on OpenSUSE Tumbleweed 15.5:
1. Ran dns-mns
2. Tested DNS servers
3. Applied DNS settings
4. Verified with resolvectl status

Fixes #42

Development Environment

Requirements

Shell script:
  • Bash 4.0+
  • Git
  • A supported OS for testing
Go binary:
  • Go 1.21+
  • Git
  • A supported OS for testing

Running Locally

# Shell script
chmod +x dns-mns.sh
./dns-mns.sh

# Go binary
go build -o dns-mns ./cmd/dns-mns/
./dns-mns

Testing Changes

# Test DNS ping function
ping -c 3 1.1.1.1

# Test DNS query (if dig is installed)
dig @1.1.1.1 google.com

# Test the full script
./dns-mns.sh

# Build and test the Go binary
go build ./cmd/dns-mns/ && ./dns-mns

Project Structure (Go)

cmd/dns-mns/main.go        # Entry point, menus, main loop
internal/dnslist/           # DNS list parser (embeds dns-list.conf)
internal/ping/              # ICMP ping testing
internal/dnstest/           # DNS query response time testing
internal/ui/                # Terminal UI (colors, progress bar, prompts)
internal/setter/            # DNS configuration (per-platform files)
When updating dns-list.conf, also copy it to internal/dnslist/dns-list.conf so the Go binary embeds the latest list.

License

By contributing, you agree that your contributions will be licensed under the MIT License.

Questions?

  • Open an issue for questions
  • Check existing issues for answers
  • Join discussions on GitLab
Thank you for helping Iranian gamers get better internet access!