Bitcoin Forum
May 01, 2024, 10:07:02 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does the image proxy work?  (Read 2457 times)
Mellnik (OP)
Sr. Member
****
Offline Offline

Activity: 242
Merit: 250


View Profile
February 04, 2015, 08:15:28 AM
Last edit: February 04, 2015, 10:23:11 AM by Mellnik
 #1

Hey, does anyone know how ip.bitcointalk.org knows if a specific image has been posted on bitcointalk.org?

Since putting random image urls to the proxy fails.
1714601222
Hero Member
*
Offline Offline

Posts: 1714601222

View Profile Personal Message (Offline)

Ignore
1714601222
Reply with quote  #2

1714601222
Report to moderator
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714601222
Hero Member
*
Offline Offline

Posts: 1714601222

View Profile Personal Message (Offline)

Ignore
1714601222
Reply with quote  #2

1714601222
Report to moderator
1714601222
Hero Member
*
Offline Offline

Posts: 1714601222

View Profile Personal Message (Offline)

Ignore
1714601222
Reply with quote  #2

1714601222
Report to moderator
1714601222
Hero Member
*
Offline Offline

Posts: 1714601222

View Profile Personal Message (Offline)

Ignore
1714601222
Reply with quote  #2

1714601222
Report to moderator
escrow.ms
Legendary
*
Offline Offline

Activity: 1274
Merit: 1004


View Profile
February 04, 2015, 08:19:57 AM
Last edit: February 04, 2015, 09:31:22 AM by escrow.ms
 #2

If the image url contains a valid image extension ie: jpg,png,gif etc, image proxy will work otherwise it won't.

For example:

Test
Code:
[img]http://imgur.com/YbpEcb0[/img]


Code:
[img]https://i.imgur.com/YbpEcb0.png[/img]


Mellnik (OP)
Sr. Member
****
Offline Offline

Activity: 242
Merit: 250


View Profile
February 04, 2015, 10:20:30 AM
 #3

OMG! -,- Put any random picture and you will see it won't work.

https://ip.bitcointalk.org/?u=https://i.imgur.com/O41Y9Du.png


https://ip.bitcointalk.org/?u=https://i.imgur.com/YbpEcb0.png
Muhammed Zakir
Hero Member
*****
Offline Offline

Activity: 560
Merit: 506


I prefer Zakir over Muhammed when mentioning me!


View Profile WWW
February 04, 2015, 11:55:26 AM
 #4

Hey, does anyone know how ip.bitcointalk.org knows if a specific image has been posted on bitcointalk.org?

Since putting random image urls to the proxy fails.

This is one of the reason:
If the image url contains a valid image extension ie: jpg,png,gif etc, image proxy will work otherwise it won't.

and the other might be:

Quote from: KnightKrawler @ reddit.com/comments/c68if/what_is_the_difference_between_iimgur_and_imgur
The i.imgur link points directly to the image whereas the imgur.com link goes to the imgur page that also shows the picture and the bandwidth and other pictures.
Any imgur link can be replaced with i.imgur and you'll see the picture with no other info.

The above is about imgur.com but I think you can understand what it means. Just don't look at the website link or name.


Ah my bad sorry, I guess image proxy is not working for new images since January. Old images are working because they are cached by the proxy.


Actually, the both links posted above is working for me.

dogie
Legendary
*
Offline Offline

Activity: 1666
Merit: 1183


dogiecoin.com


View Profile WWW
February 04, 2015, 12:05:28 PM
 #5

I thought that the post proxy image links do not work if you put them back through the proxy. Let me test now. By the way, imgur links bypass the proxy altogether.



Then editing post and putting the proxied image back through:



Yep. So you can't address the images directly on the proxy already. I'm not sure if that was the question or we'd already established that but there you go Tongue

Mellnik (OP)
Sr. Member
****
Offline Offline

Activity: 242
Merit: 250


View Profile
February 04, 2015, 03:59:55 PM
 #6

Not only 1 reply which answers my question.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12908


View Profile
February 04, 2015, 09:29:58 PM
 #7

A proper image proxy link looks like:
https://ip.bitcointalk.org/?u=http%3A%2F%2Fcdn.images.express.co.uk%2Fimg%2Fdynamic%2F1%2F590x%2FDog-handler-431049.jpg&t=549&c=fnsjPOVuf7KyWA

Notice that it has "t" and "c" parameters. These are used to check that the link was generated by the forum. Link generation is done whenever posts are loaded (at the bbcode parsing stage). So the links change over time. (Image proxy links expire after a month or two, so you can't just generate a valid link and then use it forever.)

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
dogie
Legendary
*
Offline Offline

Activity: 1666
Merit: 1183


dogiecoin.com


View Profile WWW
February 04, 2015, 11:10:37 PM
 #8

A proper image proxy link looks like:
https://ip.bitcointalk.org/?u=http%3A%2F%2Fcdn.images.express.co.uk%2Fimg%2Fdynamic%2F1%2F590x%2FDog-handler-431049.jpg&t=549&c=fnsjPOVuf7KyWA

Notice that it has "t" and "c" parameters. These are used to check that the link was generated by the forum. Link generation is done whenever posts are loaded (at the bbcode parsing stage). So the links change over time. (Image proxy links expire after a month or two, so you can't just generate a valid link and then use it forever.)

While we have you, how does the proxy know if the source image has changed content, even if its at the same URL as before? Would it take ~ a month in order to refresh or is there another check that happens?

theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12908


View Profile
February 04, 2015, 11:31:25 PM
 #9

While we have you, how does the proxy know if the source image has changed content, even if its at the same URL as before? Would it take ~ a month in order to refresh or is there another check that happens?

There is no caching on the bitcointalk.org side. The image is always passed directly from the source server to the user. Any Expires or Cache-Control headers sent by the origin server are passed through as well, so caching might be done by the client.

The code is computed from the URL, not the image data.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
dogie
Legendary
*
Offline Offline

Activity: 1666
Merit: 1183


dogiecoin.com


View Profile WWW
February 04, 2015, 11:43:23 PM
 #10

While we have you, how does the proxy know if the source image has changed content, even if its at the same URL as before? Would it take ~ a month in order to refresh or is there another check that happens?

There is no caching on the bitcointalk.org side. The image is always passed directly from the source server to the user. Any Expires or Cache-Control headers sent by the origin server are passed through as well, so caching might be done by the client.

The code is computed from the URL, not the image data.

Thanks.

Can we also whitelist flickr? Images always fall on one of the below:

https://farm1.staticflickr.com
https://farm2.staticflickr.com
https://farm3.staticflickr.com
https://farm4.staticflickr.com
https://farm5.staticflickr.com
https://farm6.staticflickr.com
https://farm7.staticflickr.com
https://farm8.staticflickr.com
https://farm9.staticflickr.com
https://farm10.staticflickr.com

Mellnik (OP)
Sr. Member
****
Offline Offline

Activity: 242
Merit: 250


View Profile
February 05, 2015, 06:56:36 AM
 #11

Thank's theymos for clarifying this!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!