Skip to content

std: elevation, process liveness, a socket UDP relay, Windows tunnel DNS - #4276

Merged
BaseMax merged 1 commit into
mainfrom
os-elevate-relay
Nov 26, 2026
Merged

BaseMax merged 1 commit into
mainfrom
os-elevate-relay

Conversation

@BaseMax

@BaseMax BaseMax commented Nov 26, 2026

Copy link
Copy Markdown
Member

Pieces a cross platform tunnel app needs.

  • os.process: IsElevated, Alive(pid) and RunElevated (osascript on macOS, pkexec on Linux, the UAC runas verb on Windows).
  • net/udprelay: Listen serves a loopback port for clients that send a token, and NewSocketClient connects to it. This works where ssh cannot share a connection, such as Windows.
  • net/tun: on Windows the plan also adds a name resolution policy rule, so queries to other adapters' DNS servers do not leave outside the tunnel.
  • Docs and tests in English and Persian.

Tested: the tests with 0.7.1 and a compiler from main on macOS arm64; the relay tests in an arm64 Alpine container; RunElevated as root on Linux; Windows is type checked only. The osascript, pkexec and UAC prompts and the Windows DNS rule have not been run.

@BaseMax
BaseMax requested a review from a team as a code owner November 26, 2026 15:59
@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 870f54b3-2f60-463f-9db7-5b46bb2aa604
Commits

Reviewing files that changed from the base of the PR and between fe8c079 and b7b6600.

Files ignored due to path filters: 6

  • tests/en/stdlib/net_tun_plan.out is excluded by !**/*.out
  • tests/en/stdlib/net_udprelay.out is excluded by !**/*.out
  • tests/en/stdlib/os_process_admin.out is excluded by !**/*.out
  • tests/fa/stdlib/net_tun_plan.out is excluded by !**/*.out
  • tests/fa/stdlib/net_udprelay.out is excluded by !**/*.out
  • tests/fa/stdlib/os_process_admin.out is excluded by !**/*.out
Files selected for processing: 14

  • docs/ai/stdlib-index.json
  • std/net/tun/plan.salam
  • std/net/udprelay/udprelay.salam
  • std/os/process/elevate.salam
  • tests/en/stdlib/net_udprelay.salam
  • tests/en/stdlib/os_process_admin.salam
  • tests/fa/stdlib/net_udprelay.salam
  • tests/fa/stdlib/os_process_admin.salam
  • tools/salam/std-coverage-docs-baseline.txt
  • website/content/en/std/191-net-tun.txt
  • website/content/en/std/194-net-udprelay.txt
  • website/content/en/std/26-os-process.txt
  • website/content/fa/std/194-net-udprelay.txt
  • website/content/fa/std/26-os-process.txt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@BaseMax
BaseMax merged commit 0215e12 into main Nov 26, 2026
26 checks passed
@BaseMax
BaseMax deleted the os-elevate-relay branch November 26, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant