AuraIP Node — Linux kurulumu / Linux installation
==================================================

Türkçe aşağıda. English below the Turkish section.

------------------------------------------------------------------
TÜRKÇE
------------------------------------------------------------------

İki seçenek var, hangisini istersen:
  A) Masaüstü uygulaması: kendi penceresi var, menüden açılır (x86-64).
  B) Komut satırı uygulaması: pencere yok; sunucular ve Raspberry Pi için.

== A) MASAÜSTÜ UYGULAMASI ==

1) İndir ve kur (sudo gerekmez)
     curl -fLO https://auraipproxy.com/downloads/AuraIP-Node-Linux-x86_64.tar.gz
     curl -fLO https://auraipproxy.com/downloads/SHA256SUMS.txt
     sha256sum --ignore-missing -c SHA256SUMS.txt
     tar xzf AuraIP-Node-Linux-x86_64.tar.gz
     ./AuraIP-Node/install.sh
   Uygulama açılır ve menüde "AuraIP Node" olarak görünür.
   Pencere açılmazsa WebKitGTK 4.1 eksiktir:
     sudo apt install libwebkit2gtk-4.1-0     (Ubuntu / Debian / Mint)
   Gerekenler: Ubuntu 22.04+, Debian 12+, Mint 21+ ya da güncel Fedora / Arch.

2) Panel -> Share & earn sayfasından aldığın token'ı pencereye gir.
   Pencereyi kapatınca paylaşım arka planda sürer; menüden tekrar açınca
   pencere geri gelir. Tamamen kapatmak için penceredeki "Quit".
   "Oturum açınca başlat" seçeneği bilgisayar açılınca arka planda başlatır.

3) Güncelleme: yeni arşivi indirip 1. adımı tekrarla.
   Kaldırma:   ./AuraIP-Node/install.sh --remove

== B) KOMUT SATIRI UYGULAMASI ==

1) Doğru dosyayı seç
   Terminalde:  uname -m
     x86_64           -> auraip-node-linux-amd64
     aarch64 / arm64  -> auraip-node-linux-arm64   (Raspberry Pi 4/5, ARM sunucular)

2) İndir ve doğrula (x86_64 örneği; ARM'de amd64 yerine arm64 yaz)
     curl -fLO https://auraipproxy.com/downloads/auraip-node-linux-amd64
     curl -fLO https://auraipproxy.com/downloads/SHA256SUMS.txt
     sha256sum --ignore-missing -c SHA256SUMS.txt
   "auraip-node-linux-amd64: OK" yazmalı.

3) Token al
   https://auraipproxy.com -> Panel -> Share & earn -> cihaz ekle.
   Token yalnızca bir kez gösterilir, sakla.

4) Çalıştır (deneme)
     chmod +x auraip-node-linux-amd64
     ./auraip-node-linux-amd64 --token TOKENIN
   İlk çalıştırmada paylaşım koşulları sorulur, "e" yaz.
   "Bağlandı" yazınca cihaz panelde çevrimiçi görünür. Durdurmak: Ctrl+C.

5) Sürekli açık kalsın (systemd servisi, önerilen)
     sudo install -m 755 auraip-node-linux-amd64 /usr/local/bin/auraip-node
     echo 'AURAIP_NODE_TOKEN=TOKENIN' | sudo tee /etc/auraip-node.env >/dev/null
     sudo chmod 600 /etc/auraip-node.env

   Aşağıdaki bloğu olduğu gibi (satır başında boşluk olmadan) yapıştır:

sudo tee /etc/systemd/system/auraip-node.service >/dev/null <<'EOF'
[Unit]
Description=AuraIP Node
After=network-online.target
Wants=network-online.target

[Service]
EnvironmentFile=/etc/auraip-node.env
ExecStart=/usr/local/bin/auraip-node --i-agree
Restart=always
RestartSec=10
DynamicUser=yes
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes

[Install]
WantedBy=multi-user.target
EOF

     sudo systemctl daemon-reload
     sudo systemctl enable --now auraip-node
     systemctl status auraip-node

   (--i-agree: paylaşım koşullarını kabul ettiğin anlamına gelir; servis
   soru soramadığı için gereklidir. Koşullar 4. adımda gösterilen metindir.)

   Alternatif: tmux / screen içinde 4. adımdaki komutu çalıştır.

6) Güncelleme
   Yeni dosyayı indir (2. adım), sonra:
     sudo install -m 755 auraip-node-linux-amd64 /usr/local/bin/auraip-node
     sudo systemctl restart auraip-node

7) Durdurma / kaldırma
     sudo systemctl disable --now auraip-node
     sudo rm /etc/systemd/system/auraip-node.service /etc/auraip-node.env /usr/local/bin/auraip-node
     sudo systemctl daemon-reload
   Cihazı paneldeki Share & earn sayfasından da durdurabilir ya da silebilirsin.

Notlar
 * Program ev ağındaki cihazlara ve bu bilgisayara erişim vermez;
   e-posta gönderim portları kapalıdır.
 * İnternet sağlayıcının sözleşmesinin paylaşıma izin verdiğinden emin ol.


------------------------------------------------------------------
ENGLISH
------------------------------------------------------------------

Two options, pick whichever you like:
  A) Desktop app: its own window, opens from the app menu (x86-64).
  B) Command-line app: no window; for servers and Raspberry Pi.

== A) DESKTOP APP ==

1) Download and install (no sudo needed)
     curl -fLO https://auraipproxy.com/downloads/AuraIP-Node-Linux-x86_64.tar.gz
     curl -fLO https://auraipproxy.com/downloads/SHA256SUMS.txt
     sha256sum --ignore-missing -c SHA256SUMS.txt
     tar xzf AuraIP-Node-Linux-x86_64.tar.gz
     ./AuraIP-Node/install.sh
   The app opens and appears in your app menu as "AuraIP Node".
   If no window appears, WebKitGTK 4.1 is missing:
     sudo apt install libwebkit2gtk-4.1-0     (Ubuntu / Debian / Mint)
   Requires Ubuntu 22.04+, Debian 12+, Mint 21+ or a current Fedora / Arch.

2) Enter the token from Dashboard -> Share & earn in the window.
   Closing the window keeps sharing in the background; open the app from
   the menu again to bring the window back. Use "Quit" to stop completely.
   "Start at login" starts it in the background when you log in.

3) Update: download the new archive and repeat step 1.
   Uninstall: ./AuraIP-Node/install.sh --remove

== B) COMMAND-LINE APP ==

1) Pick the right file
   In a terminal:  uname -m
     x86_64           -> auraip-node-linux-amd64
     aarch64 / arm64  -> auraip-node-linux-arm64   (Raspberry Pi 4/5, ARM servers)

2) Download and verify (x86_64 shown; on ARM replace amd64 with arm64)
     curl -fLO https://auraipproxy.com/downloads/auraip-node-linux-amd64
     curl -fLO https://auraipproxy.com/downloads/SHA256SUMS.txt
     sha256sum --ignore-missing -c SHA256SUMS.txt
   It should print "auraip-node-linux-amd64: OK".

3) Get a token
   https://auraipproxy.com -> Dashboard -> Share & earn -> add a device.
   The token is shown only once; keep it.

4) Run it (test)
     chmod +x auraip-node-linux-amd64
     ./auraip-node-linux-amd64 --token YOUR_TOKEN
   On first run you are asked to accept the sharing terms; type "y".
   When it says it is connected, the device shows online in the dashboard.
   Stop with Ctrl+C.

5) Keep it running (systemd service, recommended)
     sudo install -m 755 auraip-node-linux-amd64 /usr/local/bin/auraip-node
     echo 'AURAIP_NODE_TOKEN=YOUR_TOKEN' | sudo tee /etc/auraip-node.env >/dev/null
     sudo chmod 600 /etc/auraip-node.env

     Then create /etc/systemd/system/auraip-node.service with the same
     content as in the Turkish section, step 5, and run:

     sudo systemctl daemon-reload
     sudo systemctl enable --now auraip-node
     systemctl status auraip-node

   (--i-agree means you accept the sharing terms; it is required because
   a service cannot answer the prompt. The terms are the text shown in step 4.)

   Alternative: run the step 4 command inside tmux / screen.

6) Update
   Download the new file (step 2), then:
     sudo install -m 755 auraip-node-linux-amd64 /usr/local/bin/auraip-node
     sudo systemctl restart auraip-node

7) Stop / uninstall
     sudo systemctl disable --now auraip-node
     sudo rm /etc/systemd/system/auraip-node.service /etc/auraip-node.env /usr/local/bin/auraip-node
     sudo systemctl daemon-reload
   You can also pause or delete the device on the Share & earn page.

Notes
 * The app gives no access to devices on your home network or to this
   computer; e-mail sending ports are blocked.
 * Make sure your internet provider's terms allow sharing.
