Disclosed are compounds of formula I and II and pharmaceutically acceptable salts thereof. Also disclosed are methods of treating a neurodegenerative disorder, an inflammatory disease, an autoimmune disease, an ophthalmic disease or a metabolic disorder using the compounds disclosed herein.