How to anonymize your links in Discourse?


(Panteen Pro-V) #1

Hi guys, can anyone suggest some sort way or java script or plugins for discourse that will allow me to anonymize the url links?


(Régis Hanol) #2

What do you mean by “anonymize”?


(Panteen Pro-V) #3

something like this

http://anonym.to/en.html#anleitung


(Khoa Nguyen) #4

@Huey_Le you means all links will be redirected to an external domain ? As I see, there is a script in their home page. You can take a look at that


(Panteen Pro-V) #5

That’s exactly what I want. I’ve tried to copy the script and paste that into the Header ( Admin Panel, Customize --> CSS —> Header ), but it’s still not working


(Ben) #6

Try pasting that into the footer, as it says on the site. Why do you need to “antonymize” them?


(山) #7

The basic reason is perhaps his forum is talking about something or someone and links to what’s being talked about need to be antonymized so his forum and the discussions don’t show up in the target’s referrer backlogs and see what’s going on.

While this can be used for abusive means, I have used it to make sure my members can speak about other forums that are abusive to fans and link to proof of that without the other forum knowing they are actually being talked about.


(Kane York) #8

Have you tried using https://archive.today?


(山) #9

Hmm, that would be very useful. I was also looking at linkonym too, mostly because it’s hosted by google (their app engine) so there’s little chance it will suddenly poof.


(Panteen Pro-V) #10

Have you successfully implemented this feature yet? Will you be able to share what plugins or method that you used?


#11

linkonym’s current status.

https://archive.today/KH1Ul


(山) #12

Hah! Figures. Thanks for the update.

Only idea I have so far is to make a custom button for the composer to add part of the anon-izer to the front of a user’s link. But seeing that linkonym is a bust effort I’ll possibly use archive.today and use their API (if it’s usable).


(Marcin Rataj) #13

Another one is http://nullrefer.com, which seems to be quite stable and is used by some “chans”.
Usage:

  http://www.nullrefer.com/?http://www.google.com

I think the best approach here would be a server-side plugin (instead of JS executed in browser) that adds the service as a prefix to all external URLs inside of .cooked posts. That way web crawlers would not leak referrer information to linked sites.


(Kane York) #14

Note that all links by users below TL3 are rel=nofollow.


(山) #15

I found an even better anti-referrer service called Hide My Ass. I tested it using that ‘What’s my referrer?’ link from nullrefer that @lidel linked. Works perfectly.

Same as nullrefer: Add 'VPN Service for Windows, Mac, iPhone & Android | Hide My Ass! in front of any URL.


(Claas Aug.) #16

Did anybody come up with a way of enabling a dereferrer for outgoing links?

I was considering a JavaScript solution, but this does collide with Discourse’s link counting (which redirects the user via /click/track, but doesn’t change the fact that the original post’s URL will appear in the Referrer header).

Update: As long as there is no setting or plug-in for this, the only way to solve this problem would be to add the following JavaScript:

jQuery(function() {
  $('body').on('mouseover', 'a', function(evt) {
    $(evt.target).attr('rel', 'noreferrer');
  });
});

(Claas Aug.) #17

Solution: It’s best to customize your Discourse instance by adding the following snippet before </head> , which is at least supported by current versions of Chrome and Firefox (but not e.g. in IE 11).

<meta name="referrer" content="never" />

The supported values and corresponding referrers being sent (taking this topic as an example) are:


Cloak/mask outgoing links?
(Claas Aug.) #18

@codinghorror Any chance to make this a feature? Ideally, we would have

  1. a global setting like “[ ] Suppress referrer [for external links]” which would set the <meta> tag (or whatever is needed to suppress the referrer in the future).
  2. (optional) a way to configure a dereferrer service (such as dereferer.me) using a URL with a placeholder (e.g. https://dereferer.me/?%s). (The trickiest part is probably not to interfere with the link click counting.)

(Kane York) #19

You can do this right now with Admin -> Customize. Put the tag in the head section.


(Claas Aug.) #20

Yes, but:

  • This is a customization that is only available to admins who know about this issue.
  • This it not a setting that is available (more precisely: discoverable) to all admins.

For corporate Discourse instances, this can be a delicate issue, because the referrer may disclose information about

  • internal network structures (the instance might be accessible from outside, even if login restricted) and/or
  • internal topics you discuss (like unpublished projects or strategies or competitors).

And for the record: It is currently not possible to configure a dereferrer service to be used by Discourse.