Alternatively, you might violently overthrow the government and install leadership more to your liking. This is risky, expensive, and generally frowned apon. Not recommended unless you have a very reliable overseas backer.

Which leaves only one effective and morally defensible form of protest: do something illegal but moral, causing the government to do something legal but immoral. (Where legal means what the government says is legal -- which may be in contradiction of the letter of the law.)

Examples:

If the government rigs an election, surround the seat of government so as to stop it operating. The government must either step down, in which case you win immediately, or visibly arrest or hurt you, which will undermine their legitimacy in the eyes of the people, hopefully leading to further illegal protests and their eventual submission.

Greenpeace antics such as chaining yourself to an old-growth tree. When the police arrest you they are immorally opposing your moral action, plus they are condoning the immoral action of cutting down the tree. For this to be effective, this action must cost you something (jail, or a crippling fine), but it will also have a powerful effect -- the larger the cost, the larger the effect. Don't bother hiring good lawyers, just make sure any punishment you receive is publicly visible.

If there is an immoral law, break it. Get a bunch of people to break it with you -- the more people the greater the visibility. The government will either ignore the act, rendering the law ineffective, or arrest you en-mass, an immoral act that undermines their authority. eg Gandhi's salt march.

Note that these are all acts of self-sacrifice. You run a high risk that they will cost you a lot personally -- your money, your freedom, perhaps your life -- and are effective only in direct proportion to the expected loss<1>. But they also provide a good chance of achieving your ends.

<1> Using "expected" in the statistical sense. The average of the utility of each possible outcome, weighted by probability.

"One who breaks an unjust law must do so openly, lovingly, and with a
willingness to accept the penalty. I submit that an individual who
breaks a law that conscience tells him is unjust, and who willingly
accepts the penalty of imprisonment in order to arouse the conscience
of the community over its injustice, is in reality expressing the
highest respect for law."