My goal is to minimize twice differentiable convex function $f(x):\mathbb{R}^n \to \mathbb{R}$ subject to constraints $x \in C_1$ and $x \in C_2$. However I have an issue with formulating $C_2$ as I cannot represent it as a linear (matrix) inequality or a function with closed form (it can be a blackbox function). However, as $x$ approaches $\partial C_2$, $f(x)$ goes to $+\infty$. Also, constraint $C_1$ is a box constraint. Is there any package/proper way to minimize $f$ with having an initial feasible point and without explicitly considering $C_2$ constraint $C_2$?
Think of it as minimization of $\frac{1}{x+0.5}+\frac{1}{1-x}$ subject to $C_1 = [0,\infty]$ and $C_2 = (-0.5,1)$ without considering $C_2$. Although here $C_2$ is a simple inequality constraint.