If a hero is hard to deal with, and he's not in competitive play, you should really think about why he isn't picked.
Sniper, is it because he's bad at laning or doesn't have enough game impact?
Having an extremely long range carry with good items late game is fucking scary, so probably the fact that he can't lane.
So, what's an usual good lane that's viable in pro games? Let's say for simplicity two stunners in a duo lane.
Sven and Lina? There's no possibility for sniper to survive that with his low hp, unless he has two supports.
And if we want to just survive an offlane against sniper, is there anything sniper brings over a more common carry? Not really, except for some additional range, but without a nuke that's just gonna make him choose between farming and harassing you, as he can't "go for the kill" in the same way as more common carries. So just stay safe, try to get exp and maybe some last hits, don't try to challenge the supports. Positioning should be enough against a sniper and his support/s in this case.