From bd4aea23c1ea7a7c74239cb289ae339c5ad383cd Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Thu, 27 Jun 2024 18:46:37 +0200 Subject: [PATCH] Update about page --- res/include/md/about.md | 133 +++++++++++++++++++++++++------- res/include/md/abuse.md | 4 + res/include/md/filesystem.md | 10 +-- res/static/style/layout.css | 15 +++- webcontroller/web_controller.go | 24 ++++-- 5 files changed, 139 insertions(+), 47 deletions(-) diff --git a/res/include/md/about.md b/res/include/md/about.md index 1f8fe72..adabc93 100644 --- a/res/include/md/about.md +++ b/res/include/md/about.md @@ -1,5 +1,7 @@ # Questions and Answers +[TOC] + ## For how long will my files be stored? Files will be removed if they have not been viewed for 120 days. A view is @@ -13,18 +15,6 @@ logged in and you accidentally upload something you shouldn't have, just don't share the link. The file will expire eventually. File links are not indexed or published anywhere. As long as you don't share it nobody will see it. -## Do I need to register an account? - -Not if you don't want to. You're free to use pixeldrain completely anonymously. -Without a pixeldrain account you can upload files, download files and create -lists of files. And view your uploaded files on the [history page](/history). -This page only shows files which were uploaded anonymously in this web browser. - -By registering an account on pixeldrain you will be able to access your files -from any device with a web browser. Files you upload and lists you create will -be linked to your pixeldrain account and will show up on your [personal home -page](/user). - ## What cookies does pixeldrain use? When logging in to a pixeldrain account a cookie named 'pd_auth_key' will be @@ -39,6 +29,109 @@ When uploading a file pixeldrain will save a list of file links on your browser's local storage. This data is **only** used for viewing your upload history on the [history page](/history). +## How does the transfer limit work? + +Pixeldrain has two kinds of transfer limit, the free limit for users without a +subscription and the premium limit for users with a subscription. + +### Free + +The free limit tracks how much you have downloaded from pixeldrain in the last +24 hours from now. The limit is _not per day_, instead it just keeps track of +when you downloaded something and if it was less than 24 hours ago it counts +towards your limit. In technical terms this is called a 'Sliding window +algorithm'. + +The free download limit is only tracked per _IP address_. This means that if you +are sharing an IP address with other people, like through a VPN, company network +or a CGNAT network then the download limit is also shared. For free downloads it +makes no difference if you're logged in to an account or not. + +When the limit is exceeded you can still download, but file previews are +disabled and download speed is reduced. + +### Premium + +The premium transfer limit works similarly to the free download limit. The +differences are that the limit is bound to an account instead of an IP address, +and the limit is per 30 days instead of 24 hours. The same sliding window system +still applies. Any data that was transferred to/from your account between now +and 30 days ago counts towards your limit. + +Whenever someone downloads a file from your account it counts toward your +transfer limit. If you want to limit how much of your transfer cap others can +use then you can configure a limit on the [sharing settings +page](/user/sharing). + +## Will premium improve my download speed? + +No, the download speed is limited by the stability of the connection between +your computer and pixeldrain's servers. If free downloads are slow (and you have +not exceeded your download limit), then premium will not improve your download +speed. Premium only increases how much you can download, not how fast. + +If you want to know your maximum download speed from pixeldrain's servers you +can use our [speedtest](/speedtest). The speedtest will always download at the +fastest speed possible, even if your download limit has been exceeded. + +In order to keep pixeldrain affordable we use the cheapest hosting available. +That means that the quality of our network is not always the best. It's possible +that your ISP has a bad connection to our ISP which can cause bottlenecks. We +are always working on improving our connectivity. + +## Is pixeldrain available in every country? + +I strive to make pixeldrain as accessible as possible to everyone. Pixeldrain +does not block access from any country or network. Some countries have very +restricted internet connectivity though. Pixeldrain has been blocked in some +locations in the past and remains blocked in other locations. + +The reasons for blocking pixeldrain are usually not clear. The countries that +block access to pixeldrain rarely specify a reason. When a new block happens I +always reach out to the ISP or government doing the blocking, but these entities +are very hard to reach and they rarely reply. If your ISP blocks pixeldrain +**please call them and ask them why pixeldrain is blocked**. ISPs always listen +better to their own customers than website operators. + +I have a survey that you can use to notify me when an ISP blocks access to +pixeldrain. If you are having trouble accessing pixeldrain please [fill out the +survey](https://forms.gle/jThCp5S6xi49w2KP7). + +Usually a website block can be circumvented by using a different DNS provider. +The DNS provider is a service that translates website addresses (like +pixeldrain.com) into IP addresses that can be used to connect to a website. +These servers are usually operated by your ISP and can be used to censor or +monitor your browsing. + +### DNS Providers which don't block pixeldrain + +You can find a guide for how to change your DNS server on Google. Just search +for 'change dns server windows 11', or whichever operating system you use. + +| Provider | IPv4 addreses | IPv6 addresses | +|------------|--------------------------|--------------------------------------------| +| Cloudflare | 1.1.1.1, 1.0.0.1 | 2606:4700:4700::1111, 2606:4700:4700::1001 | +| Quad9 | 9.9.9.9, 149.112.112.112 | 2620:fe::fe, 2620:fe::9 | +| Google | 8.8.8.8, 8.8.4.4 | 2001:4860:4860::8888, 2001:4860:4860::8844 | + +### Countries where pixeldrain is blocked + +From the availability survey I have gathered that pixeldrain is currently +blocked in the following locations: + + * The Philippines (since 2022-03). I have reached out to PLDT about a dozen + times but they never answer. + * Egypt (since 2023-03). I have tried reaching out to WE Telecom, but their + website is not available outside egypt and their support address is bouncing + my mails. + * Italy (since 2024-01). Tried reaching out to their communications office and + police multiple times, never an answer. + * India (since 2024-04). Was unable to find a contact address anywhere. + +If you live in any of these locations and are having trouble accessing +pixeldrain **please contact your ISP**. I am ready to comply with whatever +demands they have, I just want my website to be accessible again. + ## Is there a clean pixeldrain logo I can use? Yes, here's a high resolution pixeldrain logo with text. The font is called @@ -52,15 +145,7 @@ And here's a vector version of just the icon: ## Can I advertise on pixeldrain? -Please send your advertising inquiries to this e-mail address: -[buzz.off@pixeldrain.com](mailto:buzz.off@pixeldrain.com). That will make sure -your mails never get anywhere near my inbox. - -But in all seriousness, I am not interested in running ads on pixeldrain. Ads -are destroying the web through greed and deception. I don't want anything to do -with that. I would recommend everyone to install [uBlock -Origin](https://ublockorigin.com/) to let the greedy ad tech companies know that -we're not standing for it. +No. ## Support @@ -68,9 +153,3 @@ If you have more questions please try asking them in our [support forum on Discord](https://discord.gg/UDjaBGwr4p). Pixeldrain is a one-man operation, I can't answer all the e-mails I get. By asking your questions on Discord there's a chance that someone else can help you. I am also active on Discord myself. - -If your question is not suitable for Discord you can reach me at -[support@pixeldrain.com](mailto:support@pixeldrain.com). I get a lot more e-mail -than I can reply to, so I will only reply to urgent problems or things which I -deem important. Abuse reports sent to this address will not be reviewed, use the -abuse address. diff --git a/res/include/md/abuse.md b/res/include/md/abuse.md index f9333ee..1073508 100644 --- a/res/include/md/abuse.md +++ b/res/include/md/abuse.md @@ -1,5 +1,9 @@ # Content policy +[TOC] + +## Disallowed contents + The following types of content are not allowed to be shared on pixeldrain. They will be removed when reported. diff --git a/res/include/md/filesystem.md b/res/include/md/filesystem.md index 5262b85..37663de 100644 --- a/res/include/md/filesystem.md +++ b/res/include/md/filesystem.md @@ -11,15 +11,9 @@ account with a paid subscription (Patreon or Prepaid) by going to * If you experience any issues while using the filesystem, feel free to discuss them on [the Discord community](https://discord.gg/TWKGvYAFvX). -Contents: +Contents - * [Pricing](#pricing) - * [Directory sharing](#directory-sharing) - * [Limits](#limits) - * [Importing files](#importing-files) - * [Client integrations](#client-integrations) - * [Rclone](#rclone) - * [FTPS](#ftps) +[TOC] ## Pricing diff --git a/res/static/style/layout.css b/res/static/style/layout.css index 3fe2386..8842f1c 100644 --- a/res/static/style/layout.css +++ b/res/static/style/layout.css @@ -325,7 +325,7 @@ h4, h5, h6 { line-height: 1; - margin: 0.3em 0; + margin: 0.6em 0 0.3em 0; font-weight: lighter; font-family: 'Open Sans Light', sans-serif; } @@ -336,7 +336,7 @@ h1 { } h2 { - font-size: 1.8em; + font-size: 2em; border-bottom: 1px var(--separator) solid; } @@ -375,10 +375,17 @@ a { color: var(--link_color); } -p, +p { + margin: 0.6em 0; +} + ul, ol { - margin: 0.5em 0; + padding-left: 1.5em; +} + +ul { + list-style: disc; } /* Forms*/ diff --git a/webcontroller/web_controller.go b/webcontroller/web_controller.go index a242d28..581dfbe 100644 --- a/webcontroller/web_controller.go +++ b/webcontroller/web_controller.go @@ -275,14 +275,14 @@ func (wc *WebController) serveMarkdown(tpl string, opts handlerOpts) httprouter. // Parse the markdown document and save the resulting HTML in a buffer renderer := blackfriday.NewHTMLRenderer(blackfriday.HTMLRendererParameters{ - Flags: blackfriday.CommonHTMLFlags, + Flags: blackfriday.CommonHTMLFlags | blackfriday.TOC, }) // We parse the markdown document, walk through the nodes. Extract the // title of the document, and the rest of the nodes are rendered like // normal var mdBuf bytes.Buffer - var inHeader = false + blackfriday.New( blackfriday.WithRenderer(renderer), blackfriday.WithExtensions(blackfriday.CommonExtensions|blackfriday.AutoHeadingIDs), @@ -291,14 +291,22 @@ func (wc *WebController) serveMarkdown(tpl string, opts handlerOpts) httprouter. ).Walk(func(node *blackfriday.Node, entering bool) blackfriday.WalkStatus { // Capture the title of the document so we can put it at the top of // the template and in the metadata. When entering a h1 node the - // next node will be the title of the document. Save that value + // first child will be the title of the document. Save that value if node.Type == blackfriday.Heading && node.HeadingData.Level == 1 { - inHeader = entering - return blackfriday.GoToNext + tpld.Title = string(node.FirstChild.Literal) + return blackfriday.SkipChildren } - if inHeader { - tpld.Title = string(node.Literal) - return blackfriday.GoToNext + + // If this text node contains solely the text "[TOC]" then we render + // the table of contents + if node.Type == blackfriday.Text && bytes.Equal(node.Literal, []byte("[TOC]")) { + // Find the document node and render its TOC + for parent := node.Parent; ; parent = parent.Parent { + if parent.Type == blackfriday.Document { + renderer.RenderHeader(&mdBuf, parent) + return blackfriday.SkipChildren + } + } } return renderer.RenderNode(&mdBuf, node, entering)