Compare commits

..

No commits in common. "master" and "v1.3.2" have entirely different histories.

11 changed files with 14 additions and 60 deletions

View File

@ -1,6 +0,0 @@
cache
compose.yaml
*.json
LICENSE
*.md
services

1
.gitignore vendored
View File

@ -1,5 +1,4 @@
**/cache **/cache
**/compose.yaml
**/config.json **/config.json
**/skunkyart **/skunkyart
**/skunkyart-* **/skunkyart-*

View File

@ -1,23 +0,0 @@
ARG GO_VERSION=1.18
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS build
ARG TARGETOS
ARG TARGETARCH
WORKDIR /build
COPY . .
RUN CGO_ENABLED=0 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go build -ldflags "-s -w -extldflags '-static'" && \
echo "skunkyart:x:10000:10000:SkunkyArt user:/:/sbin/nologin" > /etc/minimal-passwd && \
echo "skunkyart:x:10000:" > /etc/minimal-group
FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /build/static /static
COPY --from=build /build/skunkyart /skunkyart
COPY --from=build /etc/minimal-passwd /etc/passwd
COPY --from=build /etc/minimal-group /etc/group
USER skunkyart
ENTRYPOINT ["/skunkyart"]

View File

@ -2,7 +2,7 @@ JSON variant should be used from master — https://git.macaw.me/skunky/SkunkyAr
|Instance|Yggdrasil|I2P|Tor|NSFW|Proxifying|Modified Sources|Country| |Instance|Yggdrasil|I2P|Tor|NSFW|Proxifying|Modified Sources|Country|
|:------:|:-------:|:-:|:-:|:--:|:--------:|:--------------:|:-----:| |:------:|:-------:|:-:|:-:|:--:|:--------:|:--------------:|:-----:|
|[ls.404.mn](https://ls.404.mn/skunkyart)|[Yes](http://[201:f137:d1ac:920e:cd42:bfd1:1e83:da1d]/skunkyart)|No|No| No | Yes | No | Germany | |[skunky.ebloid.ru](https://skunky.ebloid.ru/art)|[Yes](http://[201:eba5:d1fc:bf7b:cfcb:a811:4b8b:7ea3]/art)|No|No| No | Yes | No | Russia |
|[clovius.club](https://skunky.clovius.club)|No|No|No| Yes | Yes | No | Sweden | |[clovius.club](https://skunky.clovius.club)|No|No|No| Yes | Yes | No | Sweden |
|[bloat.cat](https://skunky.bloat.cat)|No|No|No| Yes | Yes | No | Germany | |[bloat.cat](https://skunky.bloat.cat)|No|No|No| Yes | Yes | No | Germany |
|[lumaeris.com](https://skunkyart.lumaeris.com)|No|No|No| Yes | Yes | No | Germany | |[lumaeris.com](https://skunkyart.lumaeris.com)|No|No|No| Yes | Yes | No | Germany |

View File

@ -1,10 +1,6 @@
> [!NOTE]
> Currently, due to school, I cannot actively develop this project :(
> However, this does not mean that development has stopped. Just wait for the summer. For questions, write either to the Matrix room or to me in DM.
<img src="static/images/logo.png" alt="SkunkyArt" title="SkunkyArt Logo" width="20%" loading="lazy"/> <img src="static/images/logo.png" alt="SkunkyArt" title="SkunkyArt Logo" width="20%" loading="lazy"/>
[![Matrix room](https://img.shields.io/badge/matrix-000000?style=for-the-badge&logo=Matrix&logoColor=white)](https://go.kde.org/matrix/#/#skunkyart:ls.404.mn) [![Matrix room](https://img.shields.io/badge/matrix-000000?style=for-the-badge&logo=Matrix&logoColor=white)](https://go.kde.org/matrix/#/#skunkyart:ebloid.ru)
Instances: [`INSTANCES.md`](/skunky/SkunkyArt/src/branch/master/INSTANCES.md) Instances: [`INSTANCES.md`](/skunky/SkunkyArt/src/branch/master/INSTANCES.md)

View File

@ -46,7 +46,7 @@ func (s skunkyart) ParseComments(c devianter.Comments, daError devianter.Error)
if x.Parent > 0 { if x.Parent > 0 {
cmmts.WriteString(` In reply to <a href="`) cmmts.WriteString(` In reply to <a href="`)
cmmts.WriteString(s._pth) cmmts.WriteString(Path)
cmmts.WriteString("#") cmmts.WriteString("#")
cmmts.WriteString(strconv.Itoa(x.Parent)) cmmts.WriteString(strconv.Itoa(x.Parent))
cmmts.WriteString(`">`) cmmts.WriteString(`">`)

View File

@ -9,7 +9,7 @@ import (
"strings" "strings"
) )
var Host string var Host, Path string
func Router() { func Router() {
parsepath := func(path string) map[int]string { parsepath := func(path string) map[int]string {
@ -54,14 +54,15 @@ func Router() {
// функция, что управляет всем // функция, что управляет всем
handle := func(w http.ResponseWriter, r *http.Request) { handle := func(w http.ResponseWriter, r *http.Request) {
path := parsepath(r.URL.Path) Path = r.URL.Path
path := parsepath(Path)
Host = "http://" + r.Host Host = "http://" + r.Host
if h := r.Header["X-Forwarded-Proto"]; len(h) != 0 && h[0] == "https" { if h := r.Header["X-Forwarded-Proto"]; len(h) != 0 && h[0] == "https" {
Host = "https://" + r.Host Host = "https://" + r.Host
} }
var skunky = skunkyart{Version: Release.Version} var skunky = skunkyart{Version: Release.Version}
skunky._pth = r.URL.Path
skunky.Args = r.URL.Query() skunky.Args = r.URL.Query()
arg := skunky.Args.Get arg := skunky.Args.Get

View File

@ -63,7 +63,6 @@ type instanceAbout struct {
type skunkyart struct { type skunkyart struct {
Writer http.ResponseWriter Writer http.ResponseWriter
_pth string
Args url.Values Args url.Values
Page int Page int
@ -275,7 +274,7 @@ func (s skunkyart) NavBase(c DeviationList) string {
prevrev := func(msg string, page int, onpage bool) { prevrev := func(msg string, page int, onpage bool) {
if !onpage { if !onpage {
list.WriteString(`<a href="`) list.WriteString(`<a href="`)
list.WriteString(s._pth) list.WriteString(Path)
list.WriteString(`?p=`) list.WriteString(`?p=`)
list.WriteString(strconv.Itoa(page)) list.WriteString(strconv.Itoa(page))
if s.Type != 0 { if s.Type != 0 {

View File

@ -1,12 +0,0 @@
services:
skunkyart:
container_name: skunkyart
restart: unless-stopped
build: .
ports:
- "127.0.0.1:3003:3003"
security_opt:
- no-new-privileges:true
volumes:
- ./config.json:/config.json:ro
- ./cache:/cache # Ensure cache folder has a 10000:10000 ownership.

View File

@ -1,11 +1,11 @@
{ {
"instances": [ "instances": [
{ {
"title": "ls.404.mn", "title": "skunky.ebloid.ru",
"country": "Germany", "country": "Russia",
"urls": { "urls": {
"ygg": "http://[201:f137:d1ac:920e:cd42:bfd1:1e83:da1d]/skunkyart", "ygg": "http://[201:eba5:d1fc:bf7b:cfcb:a811:4b8b:7ea3]/art",
"clearnet": "https://ls.404.mn/skunkyart" "clearnet": "https://skunky.ebloid.ru/art"
}, },
"settings": { "settings": {
"proxy": true, "proxy": true,

View File

@ -6,7 +6,7 @@
<p> <p>
SkunkyArt is an alternative frontend for deviantart.com, written in Go. SkunkyArt is an alternative frontend for deviantart.com, written in Go.
</p> </p>
<h3><a href="https://go.kde.org/matrix/#/#skunkyart:ls.404.mn" target="_blank">Room in [matrix]</a></h3> <h3><a href="https://go.kde.org/matrix/#/#skunkyart:ebloid.ru" target="_blank">Room in [matrix]</a></h3>
<b>Instance settings:</b> <b>Instance settings:</b>
<ul> <ul>
<li><b>NSFW</b>: <span class="about-{{.Templates.About.Nsfw}}">{{if .Templates.About.Nsfw}}YES{{else}}NO{{end}}</span></li> <li><b>NSFW</b>: <span class="about-{{.Templates.About.Nsfw}}">{{if .Templates.About.Nsfw}}YES{{else}}NO{{end}}</span></li>
@ -44,6 +44,6 @@
{{end}} {{end}}
</ul> </ul>
</details> </details>
<p>Copyright <a href="https://go.kde.org/matrix/#/@softpigeones:ls.404.mn" target="_blank">lost+skunk</a>, X11. <a href="https://git.macaw.me/skunky/skunkyart/src/tag/v{{.Version}}" target="_blank">SkunkyArt v{{.Version}}</a></p> <p>Copyright <a href="https://go.kde.org/matrix/#/@softpigeones:ebloid.ru" target="_blank">lost+skunk</a>, X11. <a href="https://git.macaw.me/skunky/skunkyart/src/tag/v{{.Version}}" target="_blank">SkunkyArt v{{.Version}}</a></p>
</main> </main>
</html> </html>