Funnily enough, I considered
Net::HTTPTunnel, but that needs another HTTP proxy that does the CONNECT. From your description, I thought that this was not an option for you. However, if you have such a proxy on your corporate network, and such use of it is allowed, you can use Net::HTTPTunnel to create a local socket on your workstation you can connect Trillian to (although you could just as easily use that hypothetical corporate proxy directly).
Translating IM messages into HTTP requests - as you are proposing - is possible, but it's a bit like getting a camel to sleep on a trampoline - it will work, but it's extremely awkward, both for you and the camel (not to mention the trampoline). The problem with IM traffic is that it is not just you requesting stuff, as in HTTP, but also the server sending you things on its own initiative. That will not work in HTTP, unfortunately, unless the IM server supports some kind of store and forward scheme for messages, which you can then poll regularly. But I have no knowledge of servers like that, so I cannot help you there.