Proctor's justification for his confession is that he is not a good man, so why pretend to be one by not confessing? He is flawed, so he "cannot mount the gibbet like a saint...my honesty is broke...I am no good man. Nothing's spoiled by giving them this lie that were not rotten long before." I don't think that he feels his confession to be ironic; it is what you would expect of a flawed man. Rather, it is his decision in the end to NOT confess that is more ironic. He is a self-confessed adulterer who has found renewed purpose for living in the form of a reconciliation with his wife, he has a child about to be born, he feels himself a liar and a fraud, "not worth the dust on the feet of those that hang": all of these reasons would lead one to expect that he WOULD confess in order to save his life.
So, it is ironic (the opposite of what is expected) that he decides to maintain honesty and integrity, and NOT confess. Even he himself is awed at his fortitude as he retorts to Hale's "Man, you will hang! You cannot!": "I can. And there's your first marvel, that I can. You have made your magic now, for now I do think I see some shred of goodness in John Proctor." He finally considers himself a good person, and this is so unexpected that he calls it "magic" that they have made. He walks to his death feeling unexpectedly free and vindicated-that is the irony of his situation.