Firstly, if you are addicted it's too late, your willpower is shot. Blocking a site to retrain yourself is a good idea.
Humans are creatures of habit. If putting up a temporary fence forces you to build the habit of swimming between the flags - when you take away the fence your monkey brain is hopefully stuck with the good habits.
It's also a single person, vs a billion dollar industry that is spending a shit tonne of money trying to get them addicted.