Restriction Option for the Web Viewer Plugin

Check out Security | Electron

If your app has no need for navigation, you can call event.preventDefault() in a will-navigate handler. If you know which pages your app might navigate to, check the URL in the event handler and only let navigation occur if it matches the URLs you’re expecting.

Implementing a PIN-protected general blocker or even a regular block/allow list that way looks viable to me (Caveat: my knowledge of Electron is limited). Assuming that community plug-ins are sandboxed it would have to be a feature of the Obsidian core, though – correct?

2 Likes

Sir, have you found any way to block the Obsidian web viewer? I relied on Cold Turkey Blocker to restrict access to some distracting websites, and it worked very well. However, I recently discovered that the built-in browser in Obsidian can bypass these restrictions.

5 Likes

I reverted to v1.7.7 to remove the webviewer plugin, and I will continue to do so until there is an option to completely remove the webviewer.

  1. Disable Settings > General > Automatic updates
  2. Exit Obsidian (Cmd+Q)
  3. Remove ~/Library/Application Support/obsidian/obsidian-.asar if present
  4. Download v1.7.7 from GitHub
  5. Install via drag & drop to Applications, replace if prompted
  6. Launch Obsidian
2 Likes

Thank you; it worked.

However,I really don’t think this is a good way to block internet access in Obsidian,I can upgrade it with a single click.

It seems that willpower is the only method available now.

1 Like

I’m facing the same issue. I use cold turkey blocker but unfortunately Obsidian web viewer can bypass it. I noticed that cold turkey blocker can block based on the title of the window (click Win + Tab and you can see the title of the window). I would block based on the title twitch.obsidian*. Unfortunately, when you click on a link that directs you to a non-blocked site like Google and then search for something like twitch the window title doesn’t update unless you go to a different obsidian file and come back to the web viewer.

I think a useful solution would be to update the title of the window as soon as the link in the address bar changes instead of having to switch notes for the address bar to change cause that can be exploited. Additionally, adding Canvas to the windows title for canvas notes, markdown to the window title for markdown notes, and Web Viewer to the window title for Obsidian’s web viewer would also really help with blocking distractions while still using Obsidian.

3 Likes

For those on Mac, you could use Lulu to block Obsidian from accessing certain URLs..
Search for Lulu from objective-see. It’s free and open-source.

1 Like

UPDATE:

I think a solution that might work is using a firewall or customizable DNS to block unwanted sites or outgoing internet traffic in general. I found this tool called Portmaster which is a customizable DNS that’s free and open-source and is not hard to use. I didn’t want to block all internet traffic from Obsidian because I use Obsidian Sync, and would like to access my notes from multiple devices.

In portmaster, if you go to apps and profiles on the left sidebar > click obsidian > click settings > under rules you can specify domains that you want to either allow or block like YouTube and Twitch. Or alternatively you can just block internet traffic in obsidian altogether.

I haven’t been following the whole discussion here, I just wanted to add that the webview plugin can be blocked using the program Plucky manual | Plucky manual.
In this program you set up a delay (e.g. 2 hours or 4 days) and can’t change the settings until that much time has passed.
I haven’t found any way to get around this app so far, it can’t easily be uninstalled or anything like that.

1 Like

I’m trying to figure out how to do this using plucky. I downloaded it on my mac and have the edge browser extension, but I don’t know what to do from there. Any chance you could share a bit more about how you get this to work for blocking the webview plugin?

In the past, 10y ago, you had to download all kinds of utilities but nowadays many good features are shipped by default.

What you need are parental control under system settings.

You should be able to configure and manage duration, access and available locations online. I said “should” because I don’t use Mac too often.

BTW, parental controls are available on all OS nowadays, at least on Mac and Linux.

:victory_hand: Obsidian. As long as there’s no solid/customizable friction points like Cold Turkey in place (for reasons presented by OP and others), this is a massive dealbreaker. For something meant to be a focused note-taking app, this is a recipe for distraction. Even if that wasn’t the intention going into it, it functionally serves the purpose of a web browser that impulsive minds like me use for distractive binges. Not having the option or at least having tools to add friction are incredibly useful for me. Love it otherwise but this simply is a no-go. For those looking for alternatives, Zettlr has been working pretty well so far. There is an ability to render iframes, though the functionality is far more limited compared to Obsidian, though it is more minimalistic.

1 Like

I tried this and it worked for the first few hours and now is completely non functional. Tried everything to get it to work

Use case or problem

Completely unfiltered access to the internet.

When I realised Obsidian Web Viewer gave full access to the internet on the PC I edited the hosts file and added OpenDNS web filtering.

This worked only for a few hours. I tried analysing the network requests and blocking ones coming from web viewer.

This will not work with a standard windows setup or would end up blocking Obsidian sync

Proposed solution

Add in a simple optional pin to block access to settings where one could turn web viewer back on

Current workaround (optional)

Block Obsidian completely

Related feature requests (optional)

1 Like

Have you found a way to block internet traffic going from Obsidian altogether?

And do you know of a network or firewall software that could be used to block based on different characteristics like Cisco’s Enterprise firewall

I want to +1 that internet access restriction settings are very important to me as a user. I agree that there should be an option to disable internet access completely in any part of the app. So far it seems that people have given their reasons and other people have responded with why they thing that reason is a valid or invalid reason for this restriction. Because of that, I’m just going to leave my reasoning out and say that the reason doesn’t matter because it’s important to a lot of users for a lot of different reasons.

1 Like

Would like to +1 this issue. Like others in this thread I am a heavy user of both Cold Turkey and Obsidian as tools to help keep me productive and focused on my computer, but the web viewer has driven a big hole through my setup. Looks like I will have to either downgrade or uninstall Obsidian until there is a pin restriction or some other non-trivial way to disable the web viewer permanently.

Have you considered to try out “parental tools”?

Nowadays, all systems ship it by default. Maybe windows, Linux and Mac use different names to describe the same feature.

“Parental tools” can be effective since it gives you fine-grained options how users can deal with applications and online services.

The solution i use is Firewall. With Firewall you can cut the internet access of obsidian, its a problem if you use obsidian sync but i use google drive so i dont have problems.