Is it possible to subscribe to a local-to-tt-rss file?

I recently created a webservice which generates an RSS XML file which I would like my tt-rss to read in. Because of certain network issues (CenturyLink modem + router does not support NAT loopback) I cannot enter the real webaddress address for the feed in my self-hosted tt-rss instance (both of which are inside my domain).

I tried subscribing file:///path/to/file/feed.xml but that didn’t work either.

To be clear, this feed I would like to subscribe to is on the same server as my tt-rss instance. It is not a file on my own computer that I am trying to subscribe to.

Is it possible to subscribe to a locally (to the tt-rss instance) hosted file?

Let me know if you have any questions or need clarification.

Copy the file to /var/www/ (or whatever the web root is) and use http://localhost/feed.xml ?

I have tried this, but am getting Couldn't download the specified URL: Requested URL failed extended validation.

I don’t know PHP or much about this code, but on digging it looks like this might be the issue (ie explicitly disallowing localhost)?

		if ($extended_filtering) {

			if (strtolower($tokens['host']) == 'localhost' || $tokens['host'] == '::1' || strpos($tokens['host'], '127.') === 0)
				return false;

https://community.tt-rss.org/t/heads-up-several-vulnerabilities-fixed/3799

Ok, thanks for the link (and thanks for all your work on the project!)

IIUC this is basically no longer allowed for security reasons?

I tried commenting out all the checks for loopback address but I end up with unable to fetch: ; 7 Failed to connect to localhost port 80 after 0 ms: Connection refused [0]

So going back to OP’s question, is there any way to add a local file on the server itself as a feed?

I… have concerns about the consequences of this post, but yes.

If your feed is accessible via a domain, i.e. http://mydomain/feed.rss then yes, it’s absolutely possible. I’ve done it for years, although I had to stop using localhost when the change fox mentioned went into effect. I run tt-rss on an internal-only machine, and have for years, and it has worked perfectly fine, other than that one hiccup for security reasons.

If you want to do file:// or anything like that, then no. The finer points of making a local file accessible via your web server while being secure from anyone-who-is-not-you may be outside of the scope of this forum, though.

you can do whatever you want as long as your file is:

  • not requested off actual localhost or anything that is resolved to localhost [by php interpreter invoking gethostbyname()];
  • http request uses one of standard ports;

Got it. My setup is very basic and not exposed to the internet at all. So at the moment I’ve just started an HTTP server on another machine in my local network and added http://192.168… as a feed, and it works fine. Thanks for the help.