If your government is doing something wrong, then there is nothing wrong with engaging in public civil disobedience in protest, as long as the civil disobedience is nonviolent, does not betray a trust, and the individual accepts the consequences that goes with the violation (if you're going to violate a law, you need to be willing to take the punishment - if you're boycotting a company you need to be willing to do without any product by that company, including products and services already purchased). Note that when a person's actions endanger the lives of others they cannot be considered nonviolent. Violent protest on the other hand is immoral, because it endangers the lives of others.
There is are a few exceptions to the rule: