This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    Oh, how did I not notice that before? Now should be fixed.

    1
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    It's just a simple Flask server. I parse the user-agent using the user_agents Python library, apply some conditionals upon the result, render the image using Pillow and send it to the user.

    2
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    Yup, I'm parsing the user agent with the user_agents Python library.

    1
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    If you wanted to target a specific user, you could always send a DM with the image

    1
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    Looks like your home instance hexbear.net is filtering external images.

    2
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    Cool, didn't know some Lemmy instances did this

    3
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    That's weird. The extension should definitely work with the image, as that's what I used when building this quick demo. Does the content of a site like this update?

    2
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    Thought about adding the user's location, but was worried PythonAnywhere could somehow cache the image between multiple people.

    2
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    Yeah, I just use whatever the user_agents Python library gives me as user_agent.os.family.

    1
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    You could also send the image through a DM if you want to find a particular user

    4
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    The user-agent detection definitely isn’t great. If it doesn't recognize a client, it just says unknown. But that wasn't the main point of the post anyway, this was just meant as a quick proof of concept for anyone curious.

    3
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    The user-agent detection definitely isn't great, this was just meant as a quick proof of concept for anyone curios.

    7
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    Thought about adding the user's location, but was worried PythonAnywhere could somehow cache the image between multiple people. A great demo though!

    4
  • This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 99%

    This is possible because Lemmy doesn't proxy external images but instead loads them directly. While not all that bad, this could be used for Spy pixels by nefarious posters and commenters.

    Note, that the only thing that I willingly log is the "hit count" visible in the image, and I have no intention to misuse the data.

    199
  • Note: This post now archived and as such no longer works ![An external image showing your user-agent and the total "hit count"](https://web.archive.org/web/20231112152307if_/https://trilinder.pythonanywhere.com/image.jpg)

    598
    141
    This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    This is possible because Lemmy doesn't proxy external images but instead loads them directly. While not all that bad, this could be used for Spy pixels by nefarious posters and commenters.

    Note, that the only thing that I willingly log is the "hit count" visible in the image, and I have no intention to misuse the data.

    54
  • Note: This post now archived and as such no longer works ![An external image showing your user-agent and the total "hit count"](https://web.archive.org/web/20231112152307if_/https://trilinder.pythonanywhere.com/image.jpg)

    162
    24
    This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    This is possible because Lemmy doesn't proxy external images but instead loads them directly. While not all that bad, this could be used for Spy pixels by nefarious posters and commenters.

    Note, that the only thing that I willingly log is the "hit count" visible in the image, and I have no intention to misuse the data.

    110
  • Note: This post now archived and as such no longer works ![An external image showing your user-agent and the total "hit count"](https://web.archive.org/web/20231112152307if_/https://trilinder.pythonanywhere.com/image.jpg)

    293
    43
    This post knows where you're viewing it from (Lemmy doesn't proxy external images) [ARCHIVED]
  • TriLinder TriLinder 1y ago 100%

    This is possible because Lemmy doesn't proxy external images but instead loads them directly. While not all that bad, this could be used for Spy pixels by nefarious posters and commenters.

    Note, that the only thing that I willingly log is the "hit count" visible in the image, and I have no intention to misuse the data.

    31
  • Note: This post now archived and as such no longer works ![An external image showing your user-agent and the total "hit count"](https://web.archive.org/web/20231112152307if_/https://trilinder.pythonanywhere.com/image.jpg)

    90
    18
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPR
    Jump
    Dipping my toes into developing a Lemmy client.. Whats the best place to ask questions? :)
  • TriLinder TriLinder 1y ago 100%

    I've also started working on my own Lemmy app (in NativeScript). Maybe we should all create a community to share insights.

    2
  • test
    test TriLinder 1y ago 100%
    Markdown test

    # Hello, world ## H2 ### H3 [hyperlink](https://example.com/) [https://google.com/](https://example.com/) https://example.com/ ~~strikethrough~~ >quote - bullet - points - are - cool - > a quote inside a bullet point - > > > > > > q quote inside other quotes H~2~O ~small~ ~text~ ~small text~ ::: spoiler spoiler This is a [spoiler](https://www.endurancewarranty.com/wp-content/uploads/2015/04/Aftermarket_Spoiler.jpg) ::: *italic* **bold** Python code block: ```python print("Hello, world!") ``` Typescript code block: ```typescript const text = "Hello, world!"; ``` | THIS | IS | A | TABLE | | --- | --- | --- | --- | | TABLE | TABLE | TABLE | TABLE | | TABLE | TABLE | TABLE | TABLE | <b>Hello, world</b>

    1
    0