  Using optimal mass transport arguments, we prove weighted Sobolev
inequalities of the form \[\left(\int_E |u(x)|^q\,\omega(x)
\,dx\right)^{1/q}\leq K_0\,\left(\int_E |\nabla
u(x)|^p\,\sigma(x)\,dx\right)^{1/p},\ \ u\in C_0^\infty(\mathbb R^n),\ \ \ \ \
\ {\rm (WSI)}\] where $p\geq 1$ and $q>0$ is the corresponding Sobolev critical
exponent. Here $E\subseteq \mathbb R^n$ is an open convex cone, and
$\omega,\sigma:E\to (0,\infty)$ are two homogeneous weights verifying a general
concavity-type structural condition. The constant $K_0= K_0(n, p, q, \omega,
\sigma) >0$ is given by an explicit formula. Under mild regularity assumptions
on the weights, we also prove that $K_0$ is optimal in (WSI) if and only if
$\omega$ and $\sigma$ are equal up to a multiplicative factor. Several
previously known results, including the cases for monomials and radial weights,
are covered by our statement. Further examples and applications to PDEs are
also provided.
