4 Commits

Author SHA1 Message Date
Rohit Vighne
20d86e9ea6 Merge 76e5e54a67 into a51da7b8ec 2025-03-26 16:57:03 +00:00
Rohit Vighne
76e5e54a67 Listen on AF_UNIX socket if -addr is a path 2025-03-26 12:54:12 -04:00
nkanaev
a51da7b8ec Update readme.md 2025-03-26 15:11:42 +00:00
nkanaev
33503f7896 update changelog 2025-03-26 14:53:04 +00:00
4 changed files with 40 additions and 17 deletions

View File

@@ -90,6 +90,10 @@ func main() {
log.SetOutput(os.Stdout)
}
if open && strings.ContainsRune(addr, os.PathSeparator) {
log.Fatal("Cannot open unix socket path (", addr, ") in browser")
}
if db == "" {
configPath, err := os.UserConfigDir()
if err != nil {

View File

@@ -4,6 +4,7 @@
- (new) editable feed link (thanks to @adaszko)
- (new) switch to feed by clicking the title in the article page (thanks to @tarasglek for suggestion)
- (new) support multiple media links
- (new) next/prev article navigation buttons (thanks to @tillcash)
- (fix) duplicate articles caused by the same feed addition (thanks to @adaszko)
- (fix) relative article links (thanks to @adazsko for the report)
- (fix) atom article links stored in id element (thanks to @adazsko for the report)
@@ -17,6 +18,7 @@
- (etc) load external images with no-referrer policy (thanks to @tillcash for the report)
- (etc) open external links with no-referrer policy (thanks to @donovanglover)
- (etc) show article content in the list if title is missing (thanks to @asimpson for suggestion)
- (etc) accessibility improvements (thanks to @tseykovets)
# v2.4 (2023-08-15)

View File

@@ -9,21 +9,21 @@ The app is a single binary with an embedded database (SQLite).
## usage
The latest prebuilt binaries for Linux/MacOS/Windows AMD64 are available
[here](https://github.com/nkanaev/yarr/releases/latest). Installation instructions:
The latest prebuilt binaries for Linux/MacOS/Windows are available
[here](https://github.com/nkanaev/yarr/releases/latest).
The archives follow the naming convention `yarr_{OS}_{ARCH}[_gui].zip`, where:
* MacOS
* `OS` corresponds to the target operating system (darwin/linux/windows for Linux, MacOS, Windows, respectively)
* `ARCH` is the CPU architecture (`arm64` for AMD64/Aarch64, `amd64` for X86-64)
* `-gui` indicates that the application ships with the GUI (tray icon), and is a command line application if omitted
Download `yarr-*-macos64.zip`, unzip it, place `yarr.app` in `/Applications` folder, [open the app][macos-open], click the anchor menu bar icon, select "Open".
Usage instructions:
* Windows
* MacOS: place `yarr.app` in `/Applications` folder, [open the app][macos-open], click the anchor menu bar icon, select "Open".
Download `yarr-*-windows64.zip`, unzip it, open `yarr.exe`, click the anchor system tray icon, select "Open".
* Windows: open `yarr.exe`, click the anchor system tray icon, select "Open".
* Linux
Download `yarr-*-linux64.zip`, unzip it, place `yarr` in `$HOME/.local/bin`
and run [the script](etc/install-linux.sh).
* Linux: place `yarr` in `$HOME/.local/bin` and run [the script](etc/install-linux.sh).
[macos-open]: https://support.apple.com/en-gb/guide/mac-help/mh40616/mac

View File

@@ -2,7 +2,10 @@ package server
import (
"log"
"net"
"net/http"
"os"
"strings"
"sync"
"github.com/nkanaev/yarr/src/storage"
@@ -53,14 +56,28 @@ func (s *Server) Start() {
s.worker.RefreshFeeds()
}
httpserver := &http.Server{Addr: s.Addr, Handler: s.handler()}
var err error
if s.CertFile != "" && s.KeyFile != "" {
err = httpserver.ListenAndServeTLS(s.CertFile, s.KeyFile)
} else {
err = httpserver.ListenAndServe()
network := "tcp"
if strings.ContainsRune(s.Addr, os.PathSeparator) {
network = "unix"
err := os.Remove(s.Addr)
if err != nil {
log.Fatal(err)
}
}
ln, err := net.Listen(network, s.Addr)
if err != nil {
log.Fatal(err)
}
httpserver := &http.Server{Handler: s.handler()}
if s.CertFile != "" && s.KeyFile != "" {
err = httpserver.ServeTLS(ln, s.CertFile, s.KeyFile)
ln.Close()
} else {
err = httpserver.Serve(ln)
}
if err != http.ErrServerClosed {
log.Fatal(err)
}