Yep, this is commonly called SOCKS 5h (i.e some browsers and git take the proxy string as socks5h://localhost:9999).
You can actually access this in the settings page on firefox now. You don't need to configure it using the raw settings. Just go to where you set your proxy host and scroll down to the very bottom where it is kinda hidden.